Hi Karthik,

Below is the code for your question

str="BARBARICB"

For i=1 to Len(str)

M=mid(str,i,1)

set r=new regexp

r.pattern="B"

r.global=true

If r.test(M) then

tmp=tmp+1

End If

Next

Msgbox tmp

Hopeful its working for you......

Thanks,
Venkat


On Monday, October 7, 2013 5:16:03 PM UTC+5:30, karthik m wrote:
>
>
> how to count the no.of characters repeated in a given string using regular 
> expression
> how many *B* are there in the given string
>
> str="BARBARICB"
>

-- 
-- 
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/groups/opt_out.

Reply via email to