Loading ...
Sorry, an error occurred while loading the content.

22035Re: regex to delete all lines not containing

Expand Messages
  • flo.gehrke
    Sep 3, 2011
      --- In ntb-clips@yahoogroups.com, Don <don@...> wrote:
      > Suddenly not working ... thought it did.
      > File has 1300 lines, is there a file size max on this working?
      > ^!Set %DataTested%=^?{RegEx Term to Search For, Pipe Separated "or"}
      > ^!Select All
      > ^!SetListDelimiter ^P
      > ^!Set %DataOutput%="^$GetDocMatchAll("^.*(^%DataTested%).*$")$"
      > ^!InsertText ^%DataOutput%


      For me, your clip works fine. But occasionally we've experienced that ^$GetDocMatchAll$ gets into trouble with the '$' sign. In this case, you better replace '$' with ^%Dollar%...

      ^!Set %DataOutput%="^$GetDocMatchAll("^.*(^%DataTested%).*^%Dollar%")$"

      (cf the P.S. in message #18321 of Sep 6, 2008).

      On the other hand, '^$GetDocListAll' has proved to be more reliable...

      ^!Set %DataOutput%="^$GetDocListAll("^.*(^%DataTested%).*$";"$0\r\n")$"

      (no '^!SetListDelimiter' needed here).

    • Show all 9 messages in this topic