Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find position 1st occurrence of nonnumeric value in a st
Message
From
09/01/2008 15:26:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01280661
Message ID:
01280674
Views:
19
THANKS! Yeah, actually that is what I want. Disregard the find first occurence of A-Z. I'm out of it today!


>>lcmyString = "123456789 Boldorn"
>>
>>I want to return position 11 because it is the first non numeric position (B). just can't think of it today...
>
>
>lcmyString = "123456789 Boldorn"
>? AT(LEFT(CHRTRAN(lcmyString, "123456789",[]),1),lcmyString)
>
>lcmyString = "Boldor2121212n"
>? AT(LEFT(CHRTRAN(lcmyString, "123456789",[]),1),lcmyString)
>
>lcmyString = " Boldorn 123456789"
>? AT(LEFT(CHRTRAN(lcmyString, "123456789",[]),1),lcmyString)
>
>The first returns 10 becasue space is non-numeric :-)
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform