\w will match anything that is alphanumeric

\W will match anything that is NOT alphanumeric.

First, \w and \W include the underscore as part of the class, and I
think he wants it treated as a separator. Second, as Scott mentioned
before, there is no single standard for what is allowed in a regex
expression. You have to make sure you are using terms recognized by
the version you are using. Things like \W or \d are Perl extensions,
and while some utilities support them to a various degree, not
everything does so I tend to just avoid them and use explicit
equivalents that work everywhere.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.