This pattern means that it will reverse any string which contains range of letters from a to z and A to Z and also range of numericals from 0 to 9. So, if you keep your pattern like "[a-z A-Z]" and suppose you give your string as "QUeR123y"; so your answer will be "yReUQ". It will not consider the numbers since you skipped them when you defined your pattern. I hopr you got it.

## 4 comments:

thank for share, it is very important .￣︿￣

'Here is how we can Reverse a String without using any functions like len & mid

Option Explicit

Dim yourstr,r,letter,result

yourstr="program"

Set r=new regexp

r.pattern="[a-z A-Z]"

r.global=true

set s=r.execute(yourstr)

For each letter in s

result= letter.value&result

Next

print result

Thanks for your post J B C.

But i wanted to know what that pattern means?

r.pattern="[a-z A-Z]"

This pattern means that it will reverse any string which contains range of letters from a to z and A to Z and also range of numericals from 0 to 9.

So, if you keep your pattern like "[a-z A-Z]" and suppose you give your string as "QUeR123y"; so your answer will be "yReUQ". It will not consider the numbers since you skipped them when you defined your pattern.

I hopr you got it.

Post a Comment