Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: deleting commas enclosed by quotation marks

by injunjoel (Priest)
on Jun 22, 2005 at 00:23 UTC ( #468873=note: print w/replies, xml ) Need Help??


in reply to deleting commas enclosed by quotation marks

Greetings all,
Yet another way to go about it:
$string = '7374,726327,"76,237",32324,"21,342,857",23'; $string =~ s/("[^"]+")/my $tmp = $1; $tmp =~ s!,!!g; $tmp/eg; print $string;
outputs
7374,726327,"76237",32324,"21342857",23

-InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://468873]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2019-07-20 02:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?