Hi Naga,

As per the pattern, it will get only single character. The character-set 
for consideration are a-z, A-Z, 0-9. So it consider only these sets.

Execute statement evaluates this expression and in the for loop, it gets 
single char. and the logic goes like this:
Initially result=null,
In the first iteration u will get single character, that is "r". This char 
is appended to result. So result=r
In the next iteration u will get next character, that is "a". This char is 
appended to result. So result=ar
In the next iteration u will get next char, that is "v". This char is 
appended to result, So result=var
In last iteration you will get "i" which is appended to result. So result 
will become "ivar"

Hope the above helps.

Thanks,
Uday
QTP / UFT Videos <https://www.youtube.com/user/AnemUday/videos>

On Friday, 25 July 2014 21:01:03 UTC+5:30, Naga Ganjala wrote:
>
> Dim yourstr,r,letter,result
>>  yourstr="ravi"
>>  Set r=new regexp
>>  r.pattern="[a-z 0-9 A-Z]"
>>  r.global=true
>>  set s=r.execute(yourstr)
>>  
>> For each i in s
>>  result= i.value&result
>>  Next
>
>
> Can u pls any one explain this logic............ 
>

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to