Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: CSV cleanup problem...

by GrandFather (Sage)
on Jun 14, 2005 at 02:27 UTC ( #466353=note: print w/replies, xml ) Need Help??


in reply to CSV cleanup problem...

if you know the input is of the form:

"title", "messy stuff", "number"

you can use this:

/^"(.*?)", "(.*)", "(.*?)"/g to give title in $1, messy stuff in $2 and number in $3.

Note that fairly fixed formatting is assumed. Use \s* as required in place of the space in '", "'.


Perl is Huffman encoded by design.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://466353]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2018-06-18 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (109 votes). Check out past polls.

    Notices?