Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: regex compilation

by morgon (Priest)
on Feb 12, 2019 at 18:05 UTC ( #1229830=note: print w/replies, xml ) Need Help??


in reply to Re: regex compilation
in thread regex compilation

Neat trick, thanks a lot.

So I need to double all the backslashes.

Replies are listed 'Best First'.
Re^3: regex compilation
by AnomalousMonk (Bishop) on Feb 12, 2019 at 18:31 UTC
    So I need to double all the backslashes.

    I would say that you need to use  qr// to build Regexp objects. These objects behave essentially like strings in the situations in which you seem to be interested in using them.


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

Re^3: regex compilation
by Laurent_R (Canon) on Feb 12, 2019 at 18:51 UTC
    So I need to double all the backslashes.
    Probably not. I think that you need to use qr//

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2020-05-26 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (150 votes). Check out past polls.

    Notices?