Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Regex with malformed CSV files

by Anonymous Monk
on Jan 10, 2006 at 21:16 UTC ( [id://522323]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex with malformed CSV files
in thread Regex with malformed CSV files

well so far the above solution solved the malformed portion of outlook regarding newlines. to solve the problem of the embedded quotes i'm using...
$line =~ s/(?<!,)"{1,2}(?!,)/""/g;
basically just adds two quotes if it finds one, or two quotes that are not preceeded or followed by a (,) comma. This still won't solve a rule if there's one such as

"my address is ",320 main street" virginia". but in all honesty... how often is it going to happen? :) thanks for the help everyone.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://522323]
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-20 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found