title: Can I use a regex capturing group to prevent successive matches of that group?
body: <p>I have written a Javascript interpreter based on regular expressions. Is it possible to use capturing groups to prevent a successive match from evaluating any previously captured matches.</p>
  
  <p>Example:
  I start with a string <code>X</code>. Here are two replacement rules:</p>
  
  <p><code>X: 'F-[[X]+X]+F[+FX]-X'</code></p>
  
  <p><code>F: 'FF'</code></p>
  
  <p>pass 0: 
  <code>X</code> is replaced by <code>F-[[X]+X]+F[+FX]-X</code>. Since <code>F</code> is not in the initial string it is ignored.</p>
  
  <p>pass 1: here is where I want to use a capture group strategy.
  I first replace the 4 <code>X</code>s. Now, how do I ignore those matches - presumably using capturing groups - and only evaluate the rest of the string?</p>