Since languages are more complex than the A-Z alphabet:
Code:Enum gt_lost Text = 0 Numeric = 1 Specialcharacters = 2 ASCII_Text = 3 non_numeric = 4 End Enum Function RmChr(ByVal Str_chain As String, y As gt_lost) As String With CreateObject("VBScript.RegExp") .Global = True .Pattern = Array("[A-Za-z]", "\d", "[\" & Replace(StrConv("~!@#$%^&*()'-={}[]:""+;'<>?,./\|¦", 64), vbNullChar, "+\") & " ]", "\D+ ", "\D")(y) RmChr = .Replace(Str_chain, "") End With End Function Sub M_snb() MsgBox RmChr("aa~d SDRT|éëïsdf 7\77ll""ll9 3 4,799 9@á¦#(*", 4) End Sub




Reply With Quote
Bookmarks