Re: finding the first non digit character in a string

2005-10-28 Thread Jeff 'japhy' Pinyan
On Oct 28, Bowen, Bruce said: I see where you can test for a match in a string of data using the If ( ) statement, but can you use it with an 'index' statement? The index() function is for finding a string in another string. Patterns (regexes) are not allowed. $DD = "5000|SIHHTEXT" I've

Re: finding the first non digit character in a string

2005-10-28 Thread Adriano Ferreira
On 10/28/05, Bowen, Bruce <[EMAIL PROTECTED]> wrote: > The data may look like this: > $DD = "5000|SIHHTEXT" > I've tried $d = index($DD, m/[^\d]/); > $d = index($DD, /[^\d]/); > $d = index($DD, [^\d]); C doesn't work with regexes. But you can use C $ perl -e '$DD = "5000|

finding the first non digit character in a string

2005-10-28 Thread Bowen, Bruce
I see where you can test for a match in a string of data using the If ( ) statement, but can you use it with an 'index' statement? The data may look like this: $DD = "5000|SIHHTEXT" I've tried $d = index($DD, m/[^\d]/); $d = index($DD, /[^\d]/); $d = index($DD, [^\d]); n