Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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?
LanX writing a book about YM - "Lord of the Noseeums"
[Your Mother]: What a stupid, yet seductive super power. Control of biting insects.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2017-12-18 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (487 votes). Check out past polls.

    Notices?