Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: index using a range

by vsespb (Chaplain)
on Jun 13, 2013 at 22:57 UTC ( #1038855=note: print w/replies, xml ) Need Help??


in reply to index using a range

$Str1 = "000001"; print length($1) if $Str1 =~ /^(.*)[0-9]$/;
UPD:
Probably better /^(.*)[0-9]/; (without '$' in the end of regexp)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038855]
help
Chatterbox?
choroba was busy with the Pull Request Challenge

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2017-01-23 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (192 votes). Check out past polls.