Think about Loose Coupling | |
PerlMonks |
Re: Is there any way to put regex modifiers into a variable?by davies (Prior) |
on Mar 11, 2018 at 19:06 UTC ( [id://1210678]=note: print w/replies, xml ) | Need Help?? |
You can do it slightly differently by putting the regex modifier(s) inside the regex:
Note that this reveals a slight problem - I can't find your 'o' modifier in the docs. Note also that I have wrapped the regex itself in \Q\E to prevent problems if it contains metacharacters. Regards, John Davies
In Section
Seekers of Perl Wisdom
|
|