Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: deleting commas enclosed by quotation marks

by injunjoel (Priest)
on Jun 22, 2005 at 00:23 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://468873]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-19 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found