06-28-2012, 02:20 PM
Please check the below code
Code:
myvalue = "Karachi (KHI1-)"
Set regexp = New RegExp
regexp.Pattern = "[^\w\(\)\s]"
regexp.Global = True
regexp.IgnoreCase = True
set Matches = regexp.Execute(myvalue)
msgbox Matches.Count
If Matches.Count = 0 Then
msgbox "input contains only alphanumerics and spl chars ()"
else
For Each Match in Matches
msgbox Match
Next
End If
Thanks,
SUpputuri
SUpputuri