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

Re: index using a range

by vsespb (Hermit)
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)


Comment on Re: index using a range
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2014-11-27 11:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (184 votes), past polls