Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: regex for multiple capture within boundary

by ikegami (Patriarch)
on Jul 17, 2006 at 01:28 UTC ( #561627=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # @nums = ('3', '33');
    my $word = 2;
    my @nums = ($x =~ /(\S+)/g)[$word] =~ /(\d+)/g;
    
  2. or download this
    # @nums = ('3', '33');
    my $word = 2;
    my @nums = (split(' ', $x))[$word] =~ /(\d+)/g;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2023-02-03 07:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (24 votes). Check out past polls.

    Notices?