jdickens Posted January 10, 2005 Posted January 10, 2005 (edited) ;^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v Func StripNonNum($A_Val1) ;recursive fn ;WILL return multiple "." if present. WILL return "." at front or tail of string if approp. If $A_Val1 <> "" Then $CharInQuest = StringLeft($A_Val1, 1) If StringIsDigit($CharInQuest) Or ($CharInQuest = ".") Then Return $CharInQuest & StripNonNum(StringTrimLeft($A_Val1, 1)) Else Return StripNonNum(StringTrimLeft($A_Val1, 1)) EndIf Else Return "" EndIf EndFunc ;^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v Edited January 10, 2005 by jdickens If I am too verbose, just say so. You don't need to run on and on.
iceberg Posted August 16, 2008 Posted August 16, 2008 thank you, very useful. mouse not found....scroll any mouse to continue.
Moderators SmOke_N Posted August 16, 2008 Moderators Posted August 16, 2008 thank you, very useful.C'mon ... this topic is 3 and a half + years old. Did you really need to bring it back from the dead? Besides, you can do it with one line of code:$s_string = "t3902ks09a.d909.test" $s_string = StringRegExpReplace($s_string, "([\d\.]+)|(\D)", "\1") MsgBox(0, 0, $s_string) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now