title: CPP + Regular Expression to Validate URL
body: <p>I want to build a regular expression in c++{MFC} which validates the URL.</p>
  
  <p>The regular expression must satisfy following conditions.</p>
  
  <p>Valid URL:-
  <a href="http://cu-241.dell-tech.co.in/MyWebSite/ISAPIWEBSITE/Denypage.aspx/" rel="noreferrer">http://cu-241.dell-tech.co.in/MyWebSite/ISAPIWEBSITE/Denypage.aspx/</a>
  http://www.google.com
  <a href="http://www.google.co.in" rel="noreferrer">http://www.google.co.in</a></p>
  
  <p>Invalid URL:-</p>
  
  <ol>
  <li><p><a href="http://cu-241.dell-tech.co.in/" rel="noreferrer">http://cu-241.dell-tech.co.in/</a>\MyWebSite/\ISAPIWEBSITE/\Denypage.aspx/ = Regx must check &amp; invalid URL as '\' character between "/\MyWebSite/\ISAPIWEBSITE/\Denypage.aspx/"</p></li>
  <li><p><a href="http://cu-241.dell-tech.co.in//////MyWebSite/ISAPIWEBSITE/Denypage.aspx/" rel="noreferrer">http://cu-241.dell-tech.co.in//////MyWebSite/ISAPIWEBSITE/Denypage.aspx/</a> = Regx must check &amp; invalidate URL due to multiple entries of "///////" in url.</p></li>
  <li><p><a href="http://news.google.co.in/%5Cnwshp?hl=en&amp;tab=wn" rel="noreferrer">http://news.google.co.in/%5Cnwshp?hl=en&amp;tab=wn</a> = Regex must check &amp; invalidate URL for additional insertion of %5C &amp; %2F character.</p></li>
  </ol>
  
  <p>How can we develop a generic Regular Expression satisfying above condition.
  Please, Help us by providing a regular expression that will handle above scenario's in CPP{MFC}</p>