Android Question There must be a Regex for this

boten

Active Member
Licensed User
Longtime User
For Regex experts:
Given any string - return only the letters and digits
e.g: adT#$45](*xy
Will return: adT45xy
 

derez

Expert
Licensed User
Longtime User
Dim st1 As String = "adT#$45](*xy"
Dim st2 As String = ""
Dim Mtch as Matcher = Regex.Matcher("[\w]+" , st1)
Do While Mtch.find
st2 = st2 & Mtch.Match
Loop
Log( st2 )
 
Last edited:
Upvote 0
Top