P is for Practical | |
PerlMonks |
Re^3: Pattern matching exlusionby AnomalousMonk (Archbishop) |
on Nov 29, 2014 at 15:20 UTC ( [id://1108729]=note: print w/replies, xml ) | Need Help?? |
... m[10-KQ^/*$] ... Huh?!? You really need to start using <code> ... </code> tags. Please see Markup in the Monastery, Writeup Formatting Tips, How do I post a question effectively?. How would I incorporate the code [BrowserUk] suggested ... One way would be to copy the contents of the m// given by BrowserUk into a qr// regex object as you originally had it, and then interpolate the qr// into a m// match as in your OP (I'm using \z in place of $ to match absolute end-of-string): Please see perlre, perlrequick and perlretut. Also: What version of Perl are you working with? It may be useful to know this for future reference.
Update: I forgot about case insensitivity. You can add this with an /i modifier:
In Section
Seekers of Perl Wisdom
|
|