Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: CSV and regex mixups

by aquarium (Curate)
on Jul 02, 2003 at 22:10 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2023-06-08 01:26 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.