Hi, just include
c instead of a
in your expression
$input='Cat cat'; $input =~ s#\b([Cc]at)\b#<span class="topic">$1</a>#g; print $input; #output #<span class="topic">Cat</a> <span class="topic">cat</a>
In reply to Re: case preservation in regexp
by perlsen
in thread case preservation in regexp
by water
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |