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

Re: finding whole words in a string

by mrbbking (Hermit)
on May 07, 2002 at 18:45 UTC ( #164781=note: print w/replies, xml ) Need Help??


in reply to finding whole words in a string

Look for word breaks:
#!/usr/bin/perl -w use strict; foreach (qw(india indian indiana)){ print if /\bindia\b/; }
HTH - mrbbking

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://164781]
help
Chatterbox?
[Discipulus]: marto i think him pointed me is not morning in vietnam now.. but the quote is invariable
[karlgoethebier]: Discipulus: u got mail :-)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2017-06-27 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (600 votes). Check out past polls.