You replied to my post, but I think you intended to ask someone else this question — someone who used substr in his or her solution.
My solution works with any arbitrary regular expression pattern and any arbitrary replacement string. I think my solution is the one most likely to earn the OP an A+.
In reply to Re^3: Randomly regex substitute
by Jim
in thread Randomly regex substitute
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |