title: Match the 'x' which has even number of 'G' before it
body: <p>How can I match the 'x' which has even number of 'G' before it?</p>
  
  <p>For example:</p>
  
  <pre><code>x       --&gt; Match the 'x'
  Gx      --&gt; Match nothing
  GGx     --&gt; Match the 'x'
  GGGx    --&gt; Match nothing
  GGGGx   --&gt; Match the 'x'
  ...
  </code></pre>
  
  <p>Here I try to use "Nagative Look Behind":</p>
  
  <pre><code>(?&lt;!G(GG)*)x
  </code></pre>
  
  <p>But the <code>*</code> quantifier inside the lookbehind makes it non-fixed width, so this pattern is wrong.</p>
  
  <p>So how can I do?</p>