Hi Naga, We have Regular Expression object(RegExp), it provides support for vb script also. http://msdn.microsoft.com/en-us/library/kxt24tyh(v=vs.84).aspx
Dim yourstr,r,letter,result > yourstr="ravi" ' initialization of string > Set r=new regexp ' initializing RegExp object > r.pattern="[a-z 0-9 A-Z]" ' Setting the pattern(regular expression for > for all possible all alphabetical characters and numbers). we can specify > whatever string we want to search in main string(yourstr) > r.global=true ' making it to true - it returns all results; False - > only first result is returned > set s=r.execute(yourstr) ' Execute method searches for pattern specified > in yourstr variable, it returns a Matches collection object, it contains > Match objects. > > For each i in s ' iterating loop to read each Match object value > result= i.value&result ' Concatenating current value before result > string, makes string reversed after the loop > Next Now result string is having "ivar" hope it is clear now. :) On Friday, July 25, 2014 9:01:03 PM 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.
