title: Regex Optional Groups?
body: <p>I seem to have confused myself with a preg_match regex I'm doing, so fresh eyes and help would be appreciated.</p>
  
  <p>My current regex is as follows:</p>
  
  <pre><code>/&lt;!--menu:start:\(([0-9])\,([0-9])\)--&gt;(.*?)&lt;!--menu:end--&gt;/se
  </code></pre>
  
  <p>I am looking to make the number input and colon e.g. :(1,4) optional, so it would match:</p>
  
  <pre><code>&lt;!--menu:start--&gt;&lt;!--menu:end--&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;!--menu:start:(0,3)--&gt;&lt;!--menu:end--&gt;
  </code></pre>