Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Anything that is not ',' except .... RegEx question

by theorbtwo (Prior)
on Feb 27, 2008 at 14:40 UTC ( #670646=note: print w/replies, xml ) Need Help??


in reply to Anything that is not ',' except .... RegEx question

Any decent CSV module will deal with commas embedded inside the data sections of CSV files.

However, to *somewhat* more directly speak to the question you asked, instead of the question you should have asked, I think you've made a basic mistake with regexes. The inside of a [...] is a bunch of chars, not a bunch of strings, and certianly not another regex. [\d|\.] doesn't mean a digit or a dot, it means a digit, a pipe, or a dot. [\d.] would be a digit or a dot.

Anyway, writing your own CSV parser isn't going to be the best way to solve this problem. Instead, use somebody else's CSV parser, then deal with the data you get back from it.

Replies are listed 'Best First'.
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2018-08-18 06:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (185 votes). Check out past polls.

    Notices?