Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: regex compilation

by morgon (Priest)
on Feb 12, 2019 at 18:05 UTC ( [id://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 (Archbishop) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1229830]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-03-29 13:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found