Finding the number of leading zeros
Posted: Tue Mar 11, 2008 12:38 pm
Hi All,
I have a unique requirement.
I have data coming in as 000232,00116
I have to capture the number of leading zeros and along with the 1st occurance of the number after the leading zeros.
Eg: i have data coming in as 000232.
in my output i should be able to see 42 (4 is the starting occurance after after leading zero and 2 is the 1st number after leading zero)
Eg-2: in coming data is: 00116
output data: 31 (3 is the 1st occurance of a number after leading zeros and 1 is the 1st number after leading zero)
anyone please give me suggestions.
Thanks & Regards
Mark
I have a unique requirement.
I have data coming in as 000232,00116
I have to capture the number of leading zeros and along with the 1st occurance of the number after the leading zeros.
Eg: i have data coming in as 000232.
in my output i should be able to see 42 (4 is the starting occurance after after leading zero and 2 is the 1st number after leading zero)
Eg-2: in coming data is: 00116
output data: 31 (3 is the 1st occurance of a number after leading zeros and 1 is the 1st number after leading zero)
anyone please give me suggestions.
Thanks & Regards
Mark