Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Printing regular expression variable

by choroba (Abbot)
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.

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


Comment on Re: Printing regular expression variable
Download Code
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?

    MattLG

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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (16)
As of 2014-07-11 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (230 votes), past polls