Actually, almost all of the above fail because they need a 'g' on the end. The one above by ovid fails on a case of "(foo;bar;baz)"
And, my version, which only worries about running the second replace on those parens that have a semi-colon in them:
Disclaimer: I replaced ( and ) with A and Z for increased readability. It's ugly enough already! :)s#(A[^AZ]*;+[^AZ]*Z)#{($_=$1)=~s/;/,/g;$_}#eg;
In reply to Re: Search and Replace
by turnstep
in thread Search and Replace
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |