I have a problem with a regular expression, I tested that in some websites and it is working but when I use that regular expression in the project it is not matching with the correct result. the regular expression is the following
^(http|https)\://(www\.)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&%\$#\=~])*$
I need that kind of regular expression because I need validate something like that:
http://www.test.com
https://www.test.com/login
the code that I am using is the following
var pattern = new RegExp(URL_REGEXP);
if (pattern.test($('input.editValueText').val()))