in reply to Substituting a comma only when it is preceded and followed by a bracket
Output : blah blah, blah blah blah (blah; blah; blah), blah, blahuse Modern::Perl; $_= 'blah blah, blah blah blah (blah, blah, blah), blah, blah'; while($_=~ s@\(([^\)]*?)h,@\($1h;@gs){} say;
Not quite what was asked for, but it does produce the requested output :P
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Substituting a comma only when it is preceded and followed by a bracket
by Logicus (Initiate) on Nov 03, 2011 at 01:57 UTC | |
by Logicus (Initiate) on Nov 03, 2011 at 02:08 UTC |
In Section
Seekers of Perl Wisdom