Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Getting regexp from Regexp references

by Gilimanjaro (Hermit)
on Jan 28, 2003 at 20:34 UTC ( [id://230730]=note: print w/replies, xml ) Need Help??


in reply to Getting regexp from Regexp references

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...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://230730]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-03-28 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found