Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: matching the + character

by dga (Hermit)
on Aug 06, 2001 at 22:12 UTC ( [id://102538]=note: print w/replies, xml ) Need Help??


in reply to matching the + character

Also to get rid of pesky characters like + in re's you could make a character class.

Another way to do it.

use strict; my $var1 = "a+b"; my $var2 = "a[+]b"; if ($var1 =~ /$var2/) { print "hey it matches \n"; } print "hey here \n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-19 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found