Possible Duplicate:
Regex to match URL
I wrote a regular expression to validate only the following URL patterns
- http://www.abc.com
- www.abc.com
- abc.com
- http.www.abc.com
Can anyone give me a regular expression?
There's some error in the regex I used to do it, can anyone fix it?
/^((http|http|HTTP|HTTP):\/\/+(www|WWW\.)?[A-Za-z0-9\-\.]{1,}\.[A-Za-z])|((www|WWW\.)?[A- Za-z0-9\-\.]{1,}\.[A-Za-z])/i.test(value);