Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: How do you use a variable value within a regular expression pattern properly? (updated)

by haukex (Canon)
on Sep 11, 2017 at 11:43 UTC ( #1199084=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if( $string=~/ ^ $myvar REC: (.*) /x )
    
  2. or download this
    if( $string=~/ ^ \Q$myvar\E REC: (.*) /x )
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2018-11-21 11:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (239 votes). Check out past polls.

    Notices?