Extract a word from a sentenece?

Answers were Sorted based on User's Feedback



Extract a word from a sentenece?..

Answer / rajaram_patil

'Use the code below

varStr = "This is a sentence"

MyArray = Split(varStr," ")

i = ubound(MyArray)

For j=0 to i step 1
msgbox MyArray(j)
Next

Is This Answer Correct ?    15 Yes 3 No

Extract a word from a sentenece?..

Answer / rajasi patil

strValue = "This is my World"
searchWord = "my"

arrWord = Split(strValue," ")

For iCount = 0 to UBound(arrWord)
If strComp(arrWord(iCount),searchWord,1) = 0 Then
Reporter.ReportEvent micPass, "Word
Found "&searchWord, "At Position "&iCount
Exit For
End If
Next

Is This Answer Correct ?    5 Yes 0 No

Extract a word from a sentenece?..

Answer / kapil gupta

hi all
check this

varStr = "I wanted to remove one word from the sentence"
'i am trying to remove "word" from the above sent..
MyArray = Split(varStr," word ")

i = ubound(MyArray)

MyString = join(MyArray)
msgbox MysSring

Contact me on kapilet05@gmail.com if you need more info..

Is This Answer Correct ?    3 Yes 0 No

Extract a word from a sentenece?..

Answer / neeraj kumar

Hi friends!

I would like to help you,

This example can help you

Dim Str, Str2
Str="Automate your business processes & be more"
Str2=Mid(Str, 9, 5)
msgbox Str2

Is This Answer Correct ?    6 Yes 4 No

Extract a word from a sentenece?..

Answer / neeraj kumar

Hi friends!

I would like to help you,

This example can help you

Dim Str, Str2
Str="Automate your business processes & be more"
Str2=Mid(Str, 9, 5)
msgbox Str2

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More QTP Interview Questions

Why VB scripts are used in QTP and TSL in Winrunner, is there any advantage of using VB Scripts

2 Answers  


What the differences are and best practical application of each.

1 Answers  


What is the difference between shared and local object repository?

0 Answers  


If we write a script in the expert view how are the objects created in the object repository? to be clear i will explain my problem first i have recorded the mercurytours application by providing the link www.mercurytours.com and all the objects are stored in the object repository ok this is fine. but i have copied the script generated in the above processes and pasted in a new test and tried to run that script but as the objects were not stored in the object repository it showed an error (The "Welcome: Mercury Tours" object was not found in the Object Repository. Check the Object Repository to confirm that the object exists or to find the correct name for the object).so how can i overcome that error

6 Answers  


How to Set the Global Sync Timeouts in QTP?

2 Answers  






where we are going to write the descriptive programming.for example we are invoking qtp application where we are going to write that code

3 Answers  


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..

0 Answers  


4. what is the use of Text output value in Qtp?

1 Answers   Wipro,


What are the advantages of Object Repository?

0 Answers  


Can any one brief some detail on how the shared and action object repository utilized/implemented in a real time project. I already know how to make shared object repositor by saving OR as .tsr extension..I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thanks

0 Answers  


How did u write macros?What is the main importance of VB macros in testing environment?

1 Answers  


Hello, I am working on automating unix application using QTP via terminal emulator.Recording and playback works as i execute my test case. I need to parameterise my data now. Steps to be followed 1. go to the application TeWindow("TeWindow").Window("Connect").WinButton ("Connect").Click 2. Make a transaction to an account I am able to make transaction one at a time (one person when i run the script) and the script is as below and works fine. TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "./4ee.sh" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "a21100002" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "tcccc" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "test" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micF1 TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type "6" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micF1 TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "xexit" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync 3. Now i need to Make a transaction to the account for the list of people available from data table. How do i do this? Please let me know if you can Thanks, Chaya

1 Answers   Apex,


Categories