Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: <digits match>

by atcroft (Abbot)
on Jul 10, 2015 at 19:30 UTC ( [id://1134244]=note: print w/replies, xml ) Need Help??


in reply to <digits match>

End the match pattern with the number you are seeking, such as

print "3-digits ending in 5" if ( $number =~ m/\d{2}5$/ ); print "4-digit number ending in 0 or 9" if ( $number =~ m/\d{3}[09]$/ ); # as opposed to print "2 digits followed by a 3, but may have additional digits" if ( $number =~ m/\d{2}3/ );

Hope that helps.

Log In?
Username:
Password:

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

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

    No recent polls found