|The stupid question is the question not asked|
Substituting a comma only when it is preceded and followed by a bracketby barraclm (Initiate)
|on Nov 02, 2011 at 16:54 UTC||Need Help??|
barraclm has asked for the
wisdom of the Perl Monks concerning the following question:
I have a string that looks like this:
blah blah, blah blah blah (blah, blah, blah), blah, blah
I want to change the commas inside the parentheses into something else, say a semi-colon so that the string looks like
blah blah, blah blah blah (blah; blah; blah), blah, blah
There may or may not be commas either before or after the parentheses and there could be any number of commas inside the parentheses. The text on either side and inside of the parentheses is also completely variable.
Any help would be very much appreciated.