Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 02, 2012 06:16 PM by velayudham
Member
13 Points
9 Posts
Jan 24, 2012 10:51 AM|LINK
Thanks Kedarrkulkarni, for your help, it covered previous case... but now its not working for "https://google.com" :(
All-Star
34545 Points
5554 Posts
Jan 24, 2012 11:18 AM|LINK
how about this
(http(s)?://)?([\w-]+\.)+[\w-]+[.com]+(/[/?%&=]*)?
hope this helps...
300 Points
75 Posts
Jan 24, 2012 11:41 AM|LINK
It would probably be a good idea to keep the
www 's intact in order to preserve the sub-domain. A regex pattern like this: ^([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+.*)$
^([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+.*)$
would match a URL that is not prefixed by a protocol (
http://
https://
ftp://
2 Points
1 Post
Apr 11, 2012 12:21 PM|LINK
Hi Thanks for the Answer, What if we want to add query string in http as well
Regards:
Apr 17, 2012 10:28 AM|LINK
Try this..I have applied this in one of my projects and its working there. This should work
^((ftp|http|https):\/\/)?([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+.*)$
Let me know if you face any problem.
Regards,
Abhishek
37 Points
30 Posts
Jul 02, 2012 06:16 PM|LINK
when we are u using .com that time it working fine but that is not only web site ulr format for example ( .com, .in , .org , .ac.in ) like this lot of format is there ..so please post answer like all url validation supported ..
thank you
velayudham
sadhwani.man...
Member
13 Points
9 Posts
Re: Regular expression for Validating URL with or without http
Jan 24, 2012 10:51 AM|LINK
Thanks Kedarrkulkarni, for your help, it covered previous case... but now its not working for "https://google.com" :(
kedarrkulkar...
All-Star
34545 Points
5554 Posts
Re: Regular expression for Validating URL with or without http
Jan 24, 2012 11:18 AM|LINK
how about this
(http(s)?://)?([\w-]+\.)+[\w-]+[.com]+(/[/?%&=]*)?
hope this helps...
KK
Please mark as Answer if post helps in resolving your issue
My Site
eprovidere
Member
300 Points
75 Posts
Re: Regular expression for Validating URL with or without http
Jan 24, 2012 11:41 AM|LINK
It would probably be a good idea to keep the
would match a URL that is not prefixed by a protocol (
,,,etc). </div>faizan khatr...
Member
2 Points
1 Post
Re: Regular expression for Validating URL with or without http
Apr 11, 2012 12:21 PM|LINK
Hi Thanks for the Answer, What if we want to add query string in http as well
Regards:
getabhi9
Member
2 Points
1 Post
Re: Regular expression for Validating URL with or without http
Apr 17, 2012 10:28 AM|LINK
Try this..I have applied this in one of my projects and its working there. This should work
^((ftp|http|https):\/\/)?([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+.*)$
Let me know if you face any problem.
Regards,
Abhishek
velayudham
Member
37 Points
30 Posts
Re: Regular expression for Validating URL with or without http
Jul 02, 2012 06:16 PM|LINK
when we are u using .com that time it working fine but that is not only web site ulr format for example ( .com, .in , .org , .ac.in ) like this lot of format is there ..so please post answer like all url validation supported ..
thank you
velayudham