Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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]
Discipulus another oneliner in my quiver..

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2017-10-18 08:37 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (243 votes). Check out past polls.