Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Direct function or method
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Reply


Messages In This Thread
Direct function or method - by raaj123 - 05-26-2013, 08:24 AM
RE: Direct function or method - by venugqtp - 05-27-2013, 11:42 AM
RE: Direct function or method - by raaj123 - 05-27-2013, 01:20 PM
RE: Direct function or method - by venugqtp - 05-28-2013, 09:17 AM
RE: Direct function or method - by idtestingking - 09-03-2013, 03:34 PM
RE: Direct function or method - by jacosta - 09-07-2013, 04:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling a function in a Test Script from a function library anupam4j 3 6,127 06-26-2015, 12:31 AM
Last Post: babu123
  How to find built-in method/function in QTP ytramu 1 6,466 11-08-2010, 03:56 PM
Last Post: KavitaPriyaCR
  What is a Method in QTP and how many types are method r there in QTP? vidyabr 1 4,469 07-28-2008, 02:14 PM
Last Post: surya_7mar

Forum Jump:


Users browsing this thread: 2 Guest(s)