The stupid question is the question not asked | |
PerlMonks |
How to use \l and \u in regex mathing patterns?by pat_mc (Pilgrim) |
on May 09, 2012 at 16:22 UTC ( [id://969657]=perlquestion: print w/replies, xml ) | 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. Cheers - Pat
Back to
Seekers of Perl Wisdom
|
|