Need information on Grok patterns that use non capturing group (?: )
<p>I understand the concept of writing regular expressions using capturing and non-capturing groups.</p>

<p>Ex:</p>

<p><code>a(b|c)</code> would match and capture <strong>ab</strong> and <strong>ac</strong></p>

<p><code>a(?:b|c)</code> would match <strong>ab</strong> and <strong>ac</strong> but capture <strong>a</strong></p>

<p>But how is it useful when I make a new custom grok pattern and what it means to use non-capturing groups. </p>

<p>Looking at a few existing grok patterns like the one below for HOUR: </p>

<pre><code>HOUR (?:2[0123]|[01]?[0-9])
</code></pre>

<p>Here we can match the hour format using <code>(2[0123]|[01]?[0-9])</code> as well.
What makes the grok pattern use the non-capturing expression here? Based on what parameters should I decide to use this <code>(?:subex)</code></p>