Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Regex fun

by Anonymous Monk
on Dec 15, 2009 at 14:33 UTC ( [id://812883]=note: print w/replies, xml ) Need Help??


in reply to Regex fun

Something like this seems to work for printing the next \d+ characters after a numerical match:

/(\d+)(?{$' =~ m!(.{$1})!; print "$1\n"})/

Is this really the road you want to go down?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-06-25 09:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.