How to Validate this URL??
-
Hello All, I need to validate http://www.pfizer.com/news/rss\_article.jsp?rssUrl=http://mediaroom.pfizer.com/portal/site/pfizer/index.jsp?ndmViewId=news\_view&newsId=20080610006500&newsLang=en URL and also http://www.pfizer.com/news/rss\_article.jsp Below is the code which I am using but it validates first one but not the second one. function ValidateURL() { var Url = "(((ht|f)tp(s?):\/\/)|(www\.[^ \[\]\(\)\n\r\t]+)|(([012]?[0-9]{1,2}\.){3}[012]?[0-9]{1,2})\/)([^ \[\]\(\),;"'<>\n\r\t]+)([^\. \[\]\(\),;"'<>\n\r\t])|(([012]?[0-9]{1,2}\.){3}[012]?[0-9]{1,2})"; var tempURL=document.getElementById("ctl00_ContentPlaceHolder1_txteventlink").value; var matchURL=tempURL.match(Url); if(matchURL==null) { alert("Web URL does not look valid"); document.getElementById("ctl00_ContentPlaceHolder1_txteventlink").value="http://"; document.getElementById("ctl00_ContentPlaceHolder1_txteventlink").focus(); return false; } } Please help me.... Thanks in advance...