Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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



suppose im having a string wipro123xyz i need to get the value 123 only from the string today 123 w..

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

suppose im having a string wipro123xyz i need to get the value 123 only from the string today 123 w..

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

Post New Answer

More QTP Interview Questions

How many types of recording modes in qtp? Describe each type with an example where we use them?

0 Answers  


Can we create test script with out Step Generator?

4 Answers  


How to attach a file to TD?

0 Answers  


what is object repository size?

22 Answers   ITC Infotech,


what is runmodes in QTP

1 Answers  






What is meant by Pseudo Code?

5 Answers   Satyam,


Which environments are supported by hp qtp?

0 Answers  


WHAT IS OBJECT REPROSITORY?

4 Answers   BirlaSoft,


Can we do Load Teting with QTP?

12 Answers  


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 .

2 Answers  


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.

0 Answers  


what type of run time errors you get while you ar edoing rpg program?

0 Answers  






Categories