Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: How does one get all possible matches from regex?

by LanX (Saint)
on Dec 10, 2013 at 16:27 UTC ( [id://1066460]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<138> $_="  x1x2x3x  x4x5x"
     => "  x1x2x3x  x4x5x"
    
      DB<139> ; /x(\d)x(?{print "<$1>\t"})(?!)/
    <1>    <2>    <3>    <4>    <5>
    
  2. or download this
      DB<154> while ( /x(\d)x/g ) { print $1; pos($_) -= length($ &)-1 }
    12345
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-20 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found