Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

RE: Turning an argument into a regexp

by KM (Priest)
on Aug 30, 2000 at 22:10 UTC ( [id://30365]=note: print w/replies, xml ) Need Help??


in reply to Turning an argument into a regexp

Look at qr/STRING/ (perdoc perlop).

my $re = /\d+$/; # for an example pattern $thingy =~ /My Zip code is $re/; $thingy =~ /$re/; $thingy =~ s/foo{$re}bar/baz/; etc...

Cheers,
KM

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-29 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found