title: What does (?: do in a regular expression
body: <p>I have come across a regular expression that I don't fully understand - can somebody help me in deciphering it:</p>
  
  <pre><code>^home(?:\/|\/index\.asp)?(?:\?.+)?$
  </code></pre>
  
  <p>It is used in url matching and the above example matches the following urls:</p>
  
  <pre><code>home
  home/
  home/?a
  home/?a=1
  home/index.asp
  home/index.asp?a
  home/index.asp?a=1
  </code></pre>
  
  <p>It seems to me that the question marks within the brackets <code>(?:</code> don't do anything.  Can somebody enlighten me.</p>
  
  <p>The version of regex being used is the one supplied with Classic ASP and is being run on the server if that helps at all.</p>