Brethern,
I'm running Perl 5.8.6. I'm trying to pattern match some comma-delimited phrases in text. The phrases can have multiple words, plus the following punct:
( ) < > -
I'm using square braces in a regex, and seeing the following behavior that I don't understand (running in the interpreter within the debugger):
DB<116> x 'cold, too cold' =~ /( [\(\)-<>\w]+ )/x
0 'cold,'
DB<117> x 'cold, too cold' =~ /( [-<>\w\(\)]+ )/x
0 'cold'
Why am I matching the trailing comma in the first case but not the second? Is the matching within square braces supposed to be order-dependent? None of the refs I've looked at mention it.
throop