05-28-2013, 09:17 AM
Code:
'vStr = "test"
'vStr = "@#$"
vStr = "12345"
Set oReg = New RegExp
oReg.Pattern = ".*\W.*"
Set Matches = oReg.Execute(vStr)
If Matches.count > 0 Then
print "Input has Special character"
Else
print "Input has no Special character"
End If
If IsNumeric(vstr) Then
print "Input has Numeric character"
Else
print "Input has no Numeric character"
End If
Please refer QTP Help file for Regular Expression Patterns