3
NewbieNewbie
3

    Jul 11, 2005#16

    Here's the search that I performed:

    <table(.*\p)*<\/table>

    And I replaced it with some multiline code (essentially a different table)

    Note that the opening tag (<table....) is not by itself on a line, though it DOES start the line - not sure if it has any significance.

    Also note that the last </table> DOES start the line. This is definitely significant. If it didn't you would need to modify the regexp slightly:

    <table(.*\p)*.*<\/table>

    should do the trick to eat up anything on the line before the ending tag is reached.

    Hope this helps.

    Tom

    2
    NewbieNewbie
    2

      Feb 08, 2006#17

      Wouldn't it be nice if coders of UltraEdit would finally make things work as everyone expect? For example, I'm still trying to find the right regular expression to delete everything ...
      ...from this point (arrow) :
      --><script
      ...to that point :
      /script><--
      , no matter wherever the starting & ending points stand (beginning, middle or end of the line), no matter what is between these points (= how many lines are there). I hope you understand what I mean. Maybe some similar character like * which would stand for _any_thing, including also newlines etc. would be nice solution [start*end]. For now, I have to search for another software which works like I want...

      344
      MasterMaster
      344

        Feb 08, 2006#18

        Hi .uph,

        If I got you right you want to replace this:
        hurps
        bla <script
        ...to that point :
        ...to that point : hj<hj whatever <stuff >here is <written
        ...to that point : hj>hj
        blabla /script
        > xxxxx
        yyy<hola<hola<>holayy
        to that:

        hurps
        bla <> xxxxx
        yyy<hola<hola<>holayy


        so why don't you write a simple macro ? Why so sticky to regExp here ?

        Try this:

        Code: Select all

        InsertMode
        ColumnModeOff
        HexOff
        Clipboard 9
        Find "<"
        Key RIGHT ARROW
        SelectWord 
        Copy 
        Find Select "/^s"
        Cut 
        Clipboard 0
        
        It positions the cursor to the next tag (if not already done),
        searches for the occurence of an appropriate end-tag and cuts the text.

        Its only limit: it does NOT work with CASCADED tags. But I think this doesn't matter.

        Gimme some response. I think you can stop your Software-search here :-)

        rds Bego
        Normally using all newest english version incl. each hotfix. Win 10 64 bit

        2
        NewbieNewbie
        2

          Feb 08, 2006#19

          Well, I could try to explain a little bit more: I simply want some way of search-&-replacing (e.g. new wildcard/regExp or other implementation) that would _not_ care of what type the characters are (so newline characters would be considered as any 'normal' ones) - without limits, without exceptions, just working from any point to any point in file. That can be done by _simple_ search&replace function in some other progs - not in UE (?). My previous post was just a little example; yet I have to clarify that the "<>" (in "bla <> xxxxx") should have been deleted, too (it makes no sense to leave it in html). Take it rather as a feature request - I won't bother to write a macro every time I need some replacing. Anyway, thanks for the effort.

          Read more posts (-11 remaining)