Android Question Return only numbers and letters from string

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

If I have a string, how can you return only numbers and letters only ?

For Example:
B4X:
Dim MyString as string = "ABC.1>234?"
' how can I make it only return ACB1234 only ?

I know I can use:

B4X:
MyString = MyString.Replace(".","")

However, I was hoping not to use the 'replace' function.

Is there a way to make a string only contain letters and numbers only ?
 
Top