Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Regex Search String in a Variable

by roho (Bishop)
on May 01, 2021 at 20:59 UTC ( [id://11131938]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex Search String in a Variable
in thread Regex Search String in a Variable

Thanks Discipulus. I now see the reason my qr didn't work. It was because I first assigned the search string to the variable, then reassigned the variable (run through qr) to itself, which did not double the backslashes.

my $search = "x2\\.+\\x4"; $search = qr($search);

"It's not how hard you work, it's how much you get done."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-20 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found