how to get the particular chr in an array list the question
is ....i have an array like this
ABCD
EBCF
GBCH
IBCJ
HERE I NET TO GET ONLY "BC" FROM ALL HOW TO GET IT
HELP ME ANY ONE
THANKS
Answers were Sorted based on User's Feedback
Answer / gabbar
a="ABCD EBCF GBCH IBCJ"
b=Split(a," ")
For i=LBound(b) to UBound(b)
msgbox "count: "&i&" "& mid(b(i),2,2)
Next
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / koteswar
str = " ABCD EBCF GBCH IBCJ HERE I NET"
n = split(str, "BC")
cnt = ubound (n)
msgbox cnt
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / snegha
ar2=Array("ABCD","EBCF","GBCH","IBCJ")
arlen=UBound(ar2)-lbound(ar2)+1 'Finding array length
For p= 0 to arlen-1
msgbox Mid(ar2(p),2,3)
Next
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / dinesh1433
Dim AR2,i
AR2=Array("ABCD","EBCF","GBCH","IBCJ")
For i=0 to ubound(AR2)
If (Instr(AR2(i),"BC")<>0) Then
msgbox "BC found in Element :"&AR2(i)
End If
Next
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / rajesh
hai.. Koteswar
i need to say thanks for your quick reply ..
but my question is how to get BC IN A ARRAY means i need to
display it.....,BUT YOU ANS THAT HOW MANY BC ARE THERE IN
THE ARRAY LIST .....IF POSSIBLE PLEASE GIVE A COMMANDS AGAIN...
| Is This Answer Correct ? | 0 Yes | 0 No |
This will print BC 4 times.
a="ABCD EBCF GBCH IBCJ"
b=Split(a," ")
For i=0 to ubound(b)
msgbox mid(b(i),2,2)
Next
| Is This Answer Correct ? | 0 Yes | 0 No |
difference between GetRoProperry and GetToProperty.and where we've to use exactly those properties
what is the difference between data driver & data driven and driver script?
How do we do DOM programming in QTP.Could you explain with an example. If possible please provide some material or link related to DOM Programming.
I have to automate webpage. If I click one hyperlink2 it will take 2 hrs to open. How to automate hyperlink2?
4 Answers Cap Gemini, Polaris,
How can I change object description or check point values in qtp?
What is the difference betweent test and component?
how to choose the framework in qtp ? 2)when we go for the descriptive programming ?
i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.
What is the use of text output value in quicktest professional?
how can we retrieve ten rows from the data table using loop concept?
How To Export The Screen Shoots Along With The Test Reports In QTP Version 10? Thanks In Advance SenthilKumar
give one example where you have used regular expression?