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

23698Re: \W and underscore

Expand Messages
  • flo.gehrke
    Mar 16, 2013
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "John Shotsky" <jshotsky@...> wrote:
      >
      > Yet again, I've learned the hard way that \w, which is supposed
      > to mean letters and numbers, includes the underscore [_],(...)
      > This presents a bit of a problem when one uses \w virtually
      > everywhere expecting it to only pertain to actual letters and
      > numbers.

      What about the POSIX Character Class '[[:alnum:]]'? It matches numbers and letters (including characters with diacritics) but not the underscore.

      > I DO hope the developers of PCRE will address this problem.

      It's a rule that goes back to the history of Perl. So, probably, the PCRE developers won't feel affected by this issue.

      Flo
    • Show all 15 messages in this topic