Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

(jeffa) 5Re: More Variable length regex issues

by jeffa (Bishop)
on Jun 09, 2003 at 04:36 UTC ( [id://264234]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $str = 'foo,bar,moo,cow';
    my @value = $str =~ m/(\w+)\,?/g;
    ...
    
    @value = split(',',$str);
    print "@value\n"
    
  2. or download this
    my $str  = 'a,b,c:d,e,f:g,h,i';
    my @part = split(':',$str);
    ...
       my @subpart = split(',',$part);
       print "@subpart\n";
    }
    
  3. or download this
    print $_,$/ for map split(',',$_), split(':', $str);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-24 16:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found