Gwalchmai has asked for the wisdom of the Perl Monks concerning the following question:
I am using the following code to search for the contents of $term, but need to find the exact word in $term.
For example if $term = 'care', if need to find everything that has "care" and not "careful", "scare", etc.
if ($form{'field'} eq "everything") { $findit .= "/\Q$term\E/i $param "; }
.
.
.
$reg = eval "sub { $findit; }";
Can anyone help me out?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Exact Word Search While Using \Q & \E
by prasadbabu (Prior) on Apr 10, 2008 at 14:33 UTC | |
by Gwalchmai (Novice) on Apr 10, 2008 at 15:17 UTC | |
by pc88mxer (Vicar) on Apr 10, 2008 at 16:00 UTC |
Back to
Seekers of Perl Wisdom