Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Re: Splitting a comma-delimited string where a substring could countain commas

by I0 (Priest)
on May 03, 2002 at 21:53 UTC ( #163933=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Splitting a comma-delimited string where a substring could countain commas
in thread Splitting a comma-delimited string where a substring could contain commas

local $_ = "this, (that, those), these ((not enough, (nope)), never), +there"; (my $re=$_)=~s/((\()|(\))|.)/${[')','']}[!$3]\Q$1\E${['(','']}[!$2]/gs +; $re= join'|',map{quotemeta}eval{/$re/}; die $@ if $@ =~ /unmatched/; while( /((?:$re|[^,])*)/g ){ print "$1\n"; }


Comment on Re: Re: Re: Splitting a comma-delimited string where a substring could countain commas
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2014-08-21 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (136 votes), past polls