title: Complete url validation angular
body: <p>I want to validate an url with angular.</p>
  
  <p>I found this : <a href="https://stackoverflow.com/questions/35602017/url-validation-ng-pattern-not-working">URL validation. ng-pattern not working</a></p>
  
  <p>So I used : </p>
  
  <pre><code> ^((https?|ftp)://)?([A-Za-z]+\\.)?[A-Za-z0-9-]+(\\.[a-zA-Z]{1,4}){1,2}(/.*\\?.*)?$
  </code></pre>
  
  <p>It's work great for this exemple :</p>
  
  <p><a href="http://www.mywebsite.com" rel="nofollow noreferrer">http://www.mywebsite.com</a></p>
  
  <p>But it doesn't work for this complete kind of url : </p>
  
  <p><a href="http://www.mywebsite.com/blog/1" rel="nofollow noreferrer">http://www.mywebsite.com/blog/1</a></p>