finding the first non digit character in a string
- From: Bowenb@xxxxxxxxxxx (Bruce Bowen)
- Date: Fri, 28 Oct 2005 09:37:18 -0400
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]);
none of which worked.
While the text sting will always start out with some numbers, (a dollar
amount without the dollar sign) I can't always tell how large the amount
will be or if there will be any cents. I need to extract the dollar / cents
out from the text. Any suggestions as to how that can be done?
Thanks,
Bruce Bowen
401-568-8315
.
- Follow-Ups:
- Re: finding the first non digit character in a string
- From: Jeff 'japhy' Pinyan
- Re: finding the first non digit character in a string
- From: Adriano Ferreira
- Re: finding the first non digit character in a string
- Prev by Date: Re: help slurping a file-- Solved -- Thanks for responses
- Next by Date: Re: help slurping a file-- Solved -- Thanks for responses
- Previous by thread: search and replace in html text
- Next by thread: Re: finding the first non digit character in a string
- Index(es):
Relevant Pages
|