|go ahead... be a heretic|
How to use \l and \u in regex mathing patterns?by pat_mc (Pilgrim)
|on May 09, 2012 at 16:22 UTC||Need Help??|
pat_mc has asked for the
wisdom of the Perl Monks concerning the following question:
Hi there, esteemed Monks!
I am having trouble with the upper and lower case backslash escapes in regular expressions and would very much appreciate your help with these.
So far, I thought \l matches lowercase characters, similar to [a-z] would for English text. This is obviously wrong:
I then thought it acts like an operator to modify substitution strings:
This seems to work. An analogous result is obtained for \u
My question is: Can I used those escape characters in a matching pattern as well - and if so, what is their meaning in that context?
Really appreciate your wisdom.