in reply to Regex help
E:\Temp>perl -Mstrict -we "$_=7;die qq(matched '$&'\n) if '1234567_.'= +~/[$_]/" matched '7'
Seems like any punctation variables are interpolated inside regex character classes.
This is a surprise (for me at least; and to ww above too it seems)
Is that documented behaviour? Where?
Update: Fixed attribution of surprise, naming the wrong person (graff) when citing a post of ww.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Regex help
by graff (Chancellor) on Jul 26, 2009 at 02:50 UTC | |
by pKai (Priest) on Jul 26, 2009 at 09:48 UTC | |
Re^2: Regex help
by Anonymous Monk on Jul 26, 2009 at 03:05 UTC |
In Section
Seekers of Perl Wisdom