Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Printing regular expression variable

by choroba (Bishop)
on May 27, 2013 at 21:34 UTC ( #1035466=note: print w/replies, xml ) Need Help??

in reply to Printing regular expression variable

This "wrapper" has a meaning. Moreover, the "wrapper" may be different in a different version of Perl. Try wrapping regular expressions with flags:
my $regex = qr/^.*$/m; print "$regex\n"; # (?^um:^.*$) in 5.16.0

See perlre - Perl regular expressions for details.

لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Printing regular expression variable
by MattLG (Sexton) on May 27, 2013 at 23:04 UTC

    I've not been able to find any details about the regexp output format in those perl docs. Is this documented anywhere.

    And is there an alternative method to get the original regexp out of a variable?


      See Extended Patterns in the linked document.
      لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1035466]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2018-03-18 21:06 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (230 votes). Check out past polls.