Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: reg exp to find presence of value in a list of comma seperated list

by vitoco (Friar)
on Nov 18, 2009 at 02:42 UTC ( #807852=note: print w/replies, xml ) Need Help??


in reply to reg exp to find presence of value in a list of comma seperated list

You can try \b word boundary pattern:

print "found\n" if $list =~ m/\bvalue1\b/;

... or use Regexp::Keywords ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://807852]
help
Chatterbox?
Discipulus Syracusis anicula deos cotidie obsecrabat ut Dionysius..

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2016-12-05 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (75 votes). Check out past polls.