Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Answer: How do I surround commas with escaped double-quotes?

by tye (Sage)
on Jan 07, 2001 at 10:36 UTC ( #50322=categorized answer: print w/replies, xml ) Need Help??

Q&A > regular expressions > How do I surround commas with escaped double-quotes? - Answer contributed by tye

$string= "This, that, and those"; $string =~ s/,/\\",\\"/g; print $string;
Prints:
This\",\" that\",\" and those

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2017-08-20 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (314 votes). Check out past polls.

    Notices?