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 |
Need one Urgent help please,for ex: first time i created Local reposory and convert that local to shared Rep and save in some where(by using Export local objetcs), unfortunately that saved repository is missed, now i want same repository,but iam not able to export the same repository second time?? i need that Repository only how to get???
What is runtime objects and test objects? What is the difference between them?
which checkpoint we use to validate yahoo login screen window after login with ur id and password in qtp
How many actions we can create with in a test?
What is the another extension name of library file. If that is exist than what's the difference between them.
anyone can explain Diff B/w Actions and Functions
What is the method for maximize the application while we using Decriptive programming in QTP?
How do you test the text displayed in the header portion of times of india epaper. Hot news(banner) are scrolling in the top of the page, how do you test using QTP?
How to display the first 3 letters in these "ABCDEFGH" using qtp script?
action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans
Explain what the difference between Shared Repository and Per_Action Repository
waht is the diff b/w Environment variable and Global variable in qtp?? explain types of variable in qtp??