title: If-then regex: if pattern matches in a line then match another regex
body: <p>Couldn't find this exact case anywhere. Many similar examples but for some reason mine isn't working.</p>
  
  <p>Trying to accomplish:
  Within each line that contains AddMember, match all text from after the 2nd quote character to the end of the line</p>
  
  <p>After lots of research I've gotten this far:</p>
  
  <p><code>(?(?=.*\b(AddMember)\b.*\n)[^\"]+[^\"]+\n)</code></p>
  
  <p><code>.*\b(AddMember)\b.*\n</code>: matches all the correct lines</p>
  
  <p><code>[^\"]+[^\"]+\n</code>: matches correctly after the 2nd quote char</p>
  
  <p>Tried to if-then them together with this structure</p>
  
  <p><code>(?(?=ifthis)thenthis)</code></p>
  
  <p>but doesn't match anything.</p>
  
  <p>Example string:</p>
  
  <pre><code>foo.AddMember("bar");
  fu.AddMember("bur", test);
  </code></pre>
  
  <p>Should match</p>
  
  <pre><code>);
  , test);
  </code></pre>
  
  <p>Very curious as to what's wrong! Thanks for the help.</p>