finding the first non digit character in a string



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

.



Relevant Pages

  • Re: Strip amount from a string
    ... | I have a string where I need to strip out an amount. ... | "1.00 cents per gallon premium to July 2009 NYMEX RBOB Gasoline ... The problem is cents per gallon can ...
    (comp.databases.ms-access)
  • Re: Dollar Amount Conversion
    ... Macro to convert number to dollars and cents ... Dim Amount as String ... ReDim PlaceAs String ...
    (microsoft.public.word.docmanagement)
  • Re: Strip amount from a string
    ... | I have a string where I need to strip out an amount. ... | "1.00 cents per gallon premium to July 2009 NYMEX RBOB Gasoline ... The problem is cents per gallon can ...
    (comp.databases.ms-access)
  • Re: bulky regex
    ... You don't care where in the string the ... amount of spaces inbetween is not fixed. ... Prev by Date: ...
    (perl.beginners)
  • Splitting a string into groups of three characters
    ... Is there a function that split a string into groups, ... amount of characters? ... Prev by Date: ...
    (comp.lang.python)