$1 also preserves case, with the added benefit of being -w / use warnings;-friendly!
my $count = $data =~ s/\b($search)\b/$bs$1$be/gi;
--k.
In reply to Re: Re: Matching problems
by Kanji
in thread Matching problems
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |