Anyway, ISTM you want a character class [^5] in the regex to match anything but 5.
Please expand the code provided to your needs, and show us what you tried.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^3: string substitution
by LanX
in thread string substitution
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |