Isn't that what I just wrote? :-)
I think the terminology of whether badword/swearword is the pattern or the target is causing confusion. The OP has all the target strings in memory, but is fetching the patterns and substitutions once, only against the first string. That may indicate that there are more than will fit in memory. If not, then yes, it's much easier if everything's in arrays.
In reply to Re^5: s/// not replacing data
by VSarkiss
in thread s/// not replacing data
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |