Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: regex for multiple capture within boundary

by swkronenfeld (Hermit)
on Jul 14, 2006 at 21:38 UTC ( [id://561338]=note: print w/replies, xml ) Need Help??


in reply to Re: regex for multiple capture within boundary
in thread regex for multiple capture within boundary

This is pulling out all the digits. The OP is just asking for the "digits between the spaces".
my $x = "a1aa11 b2bb22bbb222 c3cc33"; my @nums = $x =~ /\d+/g; print join(" ", @nums) . "\n"; Output: 1 11 2 22 222 3 33
Ikegami's answer is pulling out the numbers between the spaces.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-19 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found