in reply to index using a range
A slight variation on the solution proposed by vsespb, I think this is a little closer to what you want.
my $Str1 = "000001"; my $Index = length($1) if $Str1 =~ /^(0*)[1-9]$/; print "$Index\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: index using a range
by romano (Initiate) on Jun 17, 2013 at 15:19 UTC |