Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 ;-)


Comment on Re: reg exp to find presence of value in a list of comma seperated list
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-08-29 07:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (343 votes), past polls