Hi pradeep....

'============================
'Author:Bibek Khatiwara
'Date:10/10/2009
'Website:http://softwaretesting9.wordpress.com/
'============================


Dim re
url_Validation()
Function url_Validation()
Set re=new regexp
inputstr=inputbox(”Enter URL to verify:”)
re.Pattern=”(http(s)?://((w{3})+\.)+([\w-]+\.)+(\w{2,4})+(/[\w-
./?%&=]*)?)|((w{3})+\.)+([\w-]+\.)+(\w{2,4})+(/[\w- ./?%&=]*)?”
re.IgnoreCase = true
if re.Test(inputstr) <> true then
msgbox “URL validation Failed”
Else
Msgbox “URL validation Passed”
End if
Set re=Nothing
End Function



On Tue, Oct 20, 2009 at 6:05 PM, Pradeep <[email protected]> wrote:

> i Have doubt regarding, how to we write a Regular expression for a URL
>
> say for example  we  do have 3 urls like
> www.monsterindia.com
>
> www.monsterindia.admin.com
>
> www.monsterindia.client.com
>
> and i want to write a regular expression in such way that , whatever url we
> type, it should the browser.
>
>
> thanks in advance...
>
>
> --
> Thanks & Regards,
>  Pradeep. K
>
> >
>


-- 
Regards,
Bibek Khatiwwaraa

Hey! Catch me on:
http://khateee.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to