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

Re: Using regexp to search

Expand Messages
  • David Patrick Henderson
    ... Strictly speaking not true. It is considered best practice in regexs that if the ‘- is to be included in the expression class that it be the first
    Message 1 of 7 , Aug 29, 2011
    • 0 Attachment
      On 29 Aug 2011, at 15:50, Carl Jacobsen wrote:

      > - must escape a literal '-' inside character classes, otherwise
      > it's interpreted to be specifying part of a range

      Strictly speaking not true. It is considered best practice in regexs that if the ‘-' is to be included in the expression class that it be the first character. Thusly:

      \<[-A-Z0-9._%+]\+@[-A-Z0-9.\]\+\.[A-Z]\{2,4}\>

      David P Henderson
      --
      "The proper office of a friend is to side with you when you are in the wrong. Nearly anybody will side with you when you are in the right."
      -- Mark Twain

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.