but this turns Cat into <a href=x>cat</a> that is, I lose the capitilization of the term. Thank you for sharing of your wisdom.$term=cat; $newterm="<a href=x>$term</a>"; $text=~s/(\W)$term(\W)/\1$newterm\2/i;
In reply to substitution preserving capitilization by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |