suppose im having a string wipro123xyz i need to get the
value 123 only from the string today 123 will be in the
middle from tommorow it will be changing to front or back
how to get the no if it changes continously?
Answers were Sorted based on User's Feedback
Answer / sailaja
txt="123wiproxyz"
mypos=instr (1,txt,"123")
msgbox mypos
k=mid ( txt,mypos,3)
msgbox k
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / aiswaryan
Function RegExpTest(patrn, strng)
Dim regEx, Match, Matches ' Create variable.
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = patrn ' Set pattern.
regEx.Global = True ' Set global applicability.
Set Matches = regEx.Execute(strng) ' Execute search.
For Each Match in Matches ' Iterate Matches collection.
RetStr = RetStr & Match.Value' & vbCRLF
Next
RegExpTest = RetStr
End Function
a=(RegExpTest("[0-9]", "1234_Today"))
msgbox(a)
"a" contains the numbers in the given string from 1st to
last position.
If anybody know smarter way to achieve above task, please
post the answer.
Is This Answer Correct ? | 2 Yes | 0 No |
How many types of recording modes in qtp? Describe each type with an example where we use them?
Can we create test script with out Step Generator?
How to attach a file to TD?
what is object repository size?
what is runmodes in QTP
What is meant by Pseudo Code?
Which environments are supported by hp qtp?
WHAT IS OBJECT REPROSITORY?
Can we do Load Teting with QTP?
Hi Friends,will any body tell to Me for which Auomation Tool their is great Requirement inht eMarket Eithr the QTP or WINRUNNER and for what reason and how long it is going to remain and wat the Scope for the automation Testing In the Future Please tll to Me In Details Ok .
When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.
what type of run time errors you get while you ar edoing rpg program?