Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Capturing parenthesis and grouping square brackets

by Eily (Monsignor)
on Jun 17, 2013 at 23:00 UTC ( [id://1039484]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $song = "nanananaaabatmannanananaaabatmannanananaaabatman";
    @batmen = split /nananana+/, $song;
    
  2. or download this
    $song = "nanananaaabatmannanaaabatmannananananaaabatman";
    @batmen = split /(na)*na+/, $song;
    

Log In?
Username:
Password:

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

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

    No recent polls found