Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://163933]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found