title: Regex : Website url regular expression translation
body: <p>Here is regular expression for URLs: </p>
  
  <pre><code>(?&lt;protocol&gt;http|ftp)://(?&lt;domain&gt;[^/\r\n]+)(?&lt;path&gt;/[^\r\n]*)?
  </code></pre>
  
  <p>I'd like to know how can it be translated? As in what each character/flag means. </p>
  
  <p>I know that:</p>
  
  <p><code>(?&lt;protocol&gt;http|ftp)://</code> :: 'protocol' is grouping name</p>
  
  <p><code>http|ftp</code> - http OR ftp</p>
  
  <p><code>://</code>  after protocol must be these characters</p>
  
  <p>And then I'd like clarification on what the following means:</p>
  
  <pre><code>`(?&lt;domain&gt;[^/\r\n]+)(?&lt;path&gt;/[^\r\n]*)?`
  </code></pre>
  
  <p>Thank you</p>