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

the ! operand

Expand Messages
  • lesliedsmith
    I ve been trying to make a not operand work in a regular expression for search and replace, but ! is not well documented under the regular expression
    Message 1 of 2 , Dec 31, 2005
    • 0 Attachment
      I've been trying to make a not operand work in a regular expression
      for search and replace, but ! is not well documented under the regular
      expression documentation. It only says that it has the same
      precedence as + and *. Does any one know how to use ! and what it does?

      Leslie
    • John Zeman
      ... While ! means NOT in several languages, it has no special meaning in NoteTab RegEx. Instead the caret (^) character means NOT when it is used within
      Message 2 of 2 , Jan 1, 2006
      • 0 Attachment
        --- In notetab@yahoogroups.com, "lesliedsmith" <leslie@s...> wrote:
        >
        > I've been trying to make a not operand work in a regular expression
        > for search and replace, but ! is not well documented under the regular
        > expression documentation. It only says that it has the same
        > precedence as + and *. Does any one know how to use ! and what it does?
        >
        > Leslie
        >


        While ! means NOT in several languages, it has no special meaning in NoteTab RegEx. Instead the caret (^) character means NOT when it is used within square brackets. For example,

        [^0-9]

        matches anything but a digit.

        However when used at the beginning of an expression without the square brackets ^ has a different meaning.

        ^cow

        will match "cow" but only if it is at the very beginning of a line.

        Happy New Year!

        John
      Your message has been successfully submitted and would be delivered to recipients shortly.