How do you find out whether the string is Numeric or Alpha
numenric.Suppose..'QTP is an automation testing tool 12345'
How should I know it is alphanumeric.Can any one please
write the code for this

Answer Posted / mrclock

A.thirumalareddy was on the right track, but here is a
revised and working version of his code:

Function IsAlphaNumeric()
Dim strText: strText = "QTP is an automation testing tool
12345" 'Search String
Dim ianRegEx
Set ianRegEx = New RegExp
ianRegEx.Pattern = "[^a-z0-9]" 'Define Search Pattern
ianRegEx.Global = True 'Apply Globally
ianRegEx.IgnoreCase = True 'Ignore upper/lower case
IsAlphaNumeric = ianRegEx.Test(strText) 'Use Test method
for a True/False test
msgbox IsAlphaNumeric 'Display True/False
End Function

call IsAlphaNumeric()

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet

1538


How do know the number of browsers opened?

627


what testplan contents and what test strategy contents,what is the diff b/w them

1651


Could i know how how to explain keyword driven framework in interview? If any body knows plz send the explanation.

1611


What is the keyword view and expert view in qtp?

538






What is reusable action?

606


Give me detailed theritical explanation about keyword driven, hybrid framework, environment variables, hybrid frame work

1444


What is meant by Step generator?what is the use of this? we have 3 steps know there what r all those.? can u all pls give me clear idea of this

1403


What is the extension of the recovery scenario file in qtp?

547


how can we test the Triggers, Cursors, Indexes while doing Database testing in DTP??

1589


Does QTP have any limitations?Can it work with all kinds of programming languages like java,springs,ajax ,hybernet?Also does it work well with windows 7.What are its other limitations

1766


How does qtp identify gui object?

587


How many types of status are there?

590


What is the diff between image and bitmap check point?

598


Give the syntax to import/export xls into qtp.

588