Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Perl Regex

by Kenosis (Priest)
on Nov 15, 2012 at 05:25 UTC ( #1003932=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my ($number) = $string =~ /(\d+)$/;
    
    print $number;
    
  2. or download this
    382411
    
  3. or download this
    my ($number) = $string =~ /(\d+)$/;
                               ^ ^ ^^
    ...
                               | | + - End capture
                               | + - One or more digits
                               + - Begin capture
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2014-07-11 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (224 votes), past polls