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

Regular Expressions: Negative search on opend documents

Expand Messages
  • anthony.judge
    I use Total Commander whose Find box allows me to search for files NOT containing text This feature is clearly possible (even trival) in NoteTab Pro using
    Message 1 of 3 , Oct 15, 2007
      I use Total Commander whose Find box allows me to search for files
      NOT containing text

      This feature is clearly possible (even trival) in NoteTab Pro using
      Regular Expressions. However despite several efforts at exploring
      these options (and the help, and other help on Regular Expressions)
      it is not obvious how to find open documents that do not have a
      simple string expression. In my case I just want the documents that
      do NOT contain <HR>

      Unfortunately the terminology for a negative find is ambiguous and it
      is difficult to search appropriately for it. And the Help facility
      does not say much about searching a all documents.

      This must be blindingly trivial !

      Any thoughts?

      Thanks

      Tony
    • Sheri
      ... When you search using the Find dialog, it tells you when the search criteria is not found. When you use a ^!Find command in clip, you have ^!IfError to do
      Message 2 of 3 , Oct 15, 2007
        --- In notetab@yahoogroups.com, "anthony.judge" <anthony.judge@...> wrote:
        >
        > I use Total Commander whose Find box allows me to search for files
        > NOT containing text
        >
        > This feature is clearly possible (even trival) in NoteTab Pro using
        > Regular Expressions. However despite several efforts at exploring
        > these options (and the help, and other help on Regular Expressions)
        > it is not obvious how to find open documents that do not have a
        > simple string expression. In my case I just want the documents that
        > do NOT contain <HR>
        >
        > Unfortunately the terminology for a negative find is ambiguous and it
        > is difficult to search appropriately for it. And the Help facility
        > does not say much about searching a all documents.
        >
        > This must be blindingly trivial !
        >
        > Any thoughts?

        When you search using the Find dialog, it tells you when the search
        criteria is not found. When you use a ^!Find command in clip, you have
        ^!IfError to do something special if the search criteria is or is not
        found. It would be easy to create a clip that searches each open
        document, and (for instance) closes the ones where there is no error
        (meaning the criteria has been found), or takes specific action in
        documents where there is an error.

        While regular expressions can have negative components it is basically
        for positive searches, i.e., to find matches for specified criteria.
        As with non-regex finds, it gives a not-found "error" when there are
        no matches.

        There is another approach (in clips) if you use a regular expression.
        You could say (in version 5.4)


        ^!IfEmpty "^$GetDocMatchAll(\<HR\>$" NoMatch Else Match
        :Match
        ;do something
        ^!Goto End
        :NoMatch
        ;do something
        ^!Goto End

        Regardless of which approach is taken, the action could be looped for
        all open documents. Join the clips list you need help with that. Clips
        are generally considered off topic for this NoteTab Basic list.

        Regards,
        Sheri
      • Sheri
        ... Typo in that, should have been: ^!IfEmpty ^$GetDocMatchAll( )$ NoMatch Else Match Sorry bout that Regards, Sheri
        Message 3 of 3 , Oct 15, 2007
          --- In notetab@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
          >
          > ^!IfEmpty "^$GetDocMatchAll(\<HR\>$" NoMatch Else Match

          Typo in that, should have been:

          ^!IfEmpty "^$GetDocMatchAll(\<HR\>)$" NoMatch Else Match

          Sorry bout that

          Regards,
          Sheri
        Your message has been successfully submitted and would be delivered to recipients shortly.