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

Re: Re: More Variable length regex issues

by pzbagel (Chaplain)
on Jun 09, 2003 at 00:40 UTC ( [id://264192]=note: print w/replies, xml ) Need Help??


in reply to Re: More Variable length regex issues
in thread More Variable length regex issues

Well, if you KNOW there will always be 4 fields, then hardcode that in your regex:

m/^([^,]*),([^,]*),([^,]*),([^,]*)$/;

A warning: that regex wouldn't work right if there was comma embedded in quotes in one of the fields. I'd recommend using the Text::CSV_XS module, but as you state that you aren't actually using Perl...

Later

Replies are listed 'Best First'.
Re: Re: Re: More Variable length regex issues
by dextius (Monk) on Jun 09, 2003 at 00:46 UTC
    Yeah, the whole "variable length" part of the string is the problem. Thanks for your help..

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found