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?
Answer Posted / 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 |
Post New Answer View All Answers
what is the diff between manual test plan document and automation test plan doc.can u explain indetail.
How you can replace string in qtp?
How will you check that your test cases covered all the requirements?
Is it possible to change the property value at runtime? How it is possible?
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
can any body give the banking domain concepts/links
what r the verstions from 1st to present (verstions) of mercury tools (like winrunner,QTP,Loadrunner) ? Chandana
whare exactly we have to use functions and sub routain
What is data driver in qtp? Where we use it?
I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
in a web page hoe to check the dynamic links that rechabging with out using regular expressions
how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief
how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me
Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?