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

How to get line numbers in your editor in expert view?

2 Answers  


How do we run the scripts in QTP ?? what are the three options....

4 Answers   HCL,


Syntax for how to call one script from another? and Syntax to call one "Action" in another?

2 Answers  


why we use check points , In qtp we use the any check points , what r they , when and why

1 Answers   Polaris,


What is the difference between the design-time and run-time data tables?

0 Answers  






does test plan is in test strategy or test strategy is in test plan.

6 Answers   Microsoft, TCS,


I added 5 edit box objects in OR.i run the script and the first edit box successfully executed.But on next day when i executed same script for second edit box,it gives an error "object not Found". But when i used Highlight in app. object already in OR.So how i will handel this type of error. Hi please inform me the write answer.Its urgent.

1 Answers   TCS,


how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?

0 Answers  


write a script to close all open browser in qtp except one browser whose name is xyz

6 Answers   Cap Gemini,


How many types of parameters are there?

0 Answers  


WHAT IS SMATR IDENTIFICATION? plz EXPLAIN BRIEFLY? IS IT POSSIBLE in QTP? HOW AND WHEn THE SITUATION U R USING EXPLAIN WITH EXAMPLE?

3 Answers  


What does it mean when a check point is in red color? What do you do?

0 Answers  


Categories