in reply to Re^2: Substituting a comma only when it is preceded and followed by a bracket
in thread Substituting a comma only when it is preceded and followed by a bracket
Does this help you?
s[ ( ## Capture \( ## from an open paren [^)]+ ## all non-close paren chars \) ## upto the close paren ) ][ ## assign the captured text ## to a local variable so that it can be edited ## and then replace all ,s with ;s ( my $x = $1 ) =~ tr[,][;]; ## and return the modified text to replace that captured. $x ] g ## globally e ## execute the replace as code x; ## extended notation to allow whitespace and comments
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Substituting a comma only when it is preceded and followed by a bracket
by sundialsvc4 (Abbot) on Nov 03, 2011 at 14:26 UTC | |
by BrowserUk (Patriarch) on Nov 03, 2011 at 18:12 UTC |
In Section
Seekers of Perl Wisdom