develooper Front page | perl.beginners | Postings from August 2009

Re: Regular expression help

Thread Previous
From:
Uri Guttman
Date:
August 25, 2009 23:30
Subject:
Re: Regular expression help
Message ID:
87ocq3krzm.fsf@quad.sysarch.com
>>>>> "DT" == Dave Tang <d.tang@imb.uq.edu.au> writes:


  DT> a,b,c,d,e,"f1,f2","g1,g2" which spoil my split(/,/).

  DT> Could someone provide some guidance?

use a CSV module. parsing csv files is a pain with regexes (even if
doable). there are very stable and fast csv modules on cpan so get one
and use it.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About