Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: CSV and regex mixups

by aquarium (Curate)
on Jul 02, 2003 at 22:10 UTC ( [id://270987]=note: print w/replies, xml ) Need Help??


in reply to CSV and regex mixups

you do need to strip/convert any commas and quotes from your input or csv::text will get it wrong. you should also strip any non-printing chars and semicolons etc., ie define a strict set of characters to allow rather than dis-allowing some. this should be a no brainer for you if you just consider the input one at a time; not the entire assembled string.
btw - in your regex with .? that stands for zero or one occurences of any character...not any number of characters, as i believe you intended. i think you were after .+ match one or more times.

Replies are listed 'Best First'.
Re: Re: CSV and regex mixups
by cidaris (Friar) on Jul 02, 2003 at 23:29 UTC
    Nope, by any number, I meant 0 or more, as several of the fields come back like "bono","the edge","","larry mullen, jr."

    No, I'm not making a music database, just spitting out example values as they occurr to me.

Log In?
Username:
Password:

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

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

    No recent polls found