Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 (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? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2023-03-21 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?