in reply to Re: Re: Regular Expression To Extract Multiple Matches Pattern
in thread Regular Expression To Extract Multiple Matches Pattern

[\w[^_]]
Nested character classes aren't implemented yet... That will parse somthing like this:
[ # start char class \w # any word char [ # or a literal '[' ^ # or a literal '^' _ # or an underscore (redundant...) ] # end char class ] # followed by a literal ']'
If you want a character class consisting of all the word chars except underscore, you need to use the double negative (and somewhat non-intuitive):
[^\W_]
Which matches a character that is not a non word char (i.e a word char) and not an underscore.
% perl -le '/[^\W_]/ && print for qw(a b _ c d)' a b c d

-Blake