Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Tidying and simplifying a regular expression

by AnomalousMonk (Archbishop)
on Dec 10, 2017 at 05:02 UTC ( [id://1205237]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Tidying and simplifying a regular expression (flags)
in thread Tidying and simplifying a regular expression

It's about preserving the flags of the embedded regex ...

Yes, and the reason that is done is, at least in part, to make composition of relatively more complex regexes from simpler  qr// components (via interpolation) work "right."


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^4: Tidying and simplifying a regular expression (interpolation)
by LanX (Saint) on Dec 10, 2017 at 22:22 UTC
    > composition of relatively more complex regexes from simpler  qr//  components (via interpolation)

    The "interpolation" part is surprising and irritating me here.

    I was somehow expecting that an already compiled simpler regex doesn't need to be stringified and interpolated again.

    But this approach is surely easier to achieve and most probably more robust.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-19 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found