Don't ask to ask, just ask | |
PerlMonks |
Re: Getting regexp from Regexp referencesby Gilimanjaro (Hermit) |
on Jan 28, 2003 at 20:34 UTC ( [id://230730]=note: print w/replies, xml ) | Need Help?? |
What you see is what you get... :) You can actually use the string you're getting as a regex... The (?imsx-imsx:...) syntax can be used within a // construct to enable/disable the modifiers that are normaly placed outside the //'s. This syntax is actually encouraged in the perlre manpage for usage with dynamic patterns, which is exactly what you seem to be dealing with. And the 'compiled' regexes that qr returns can be used in another regex, so you should be able to just plain join them with '|', and qr the result...
In Section
Seekers of Perl Wisdom
|
|