title: htaccess rewrite url by matching part of the url
body: <p>I have been fiddling around with my rewrite rules to cover a domain's content being moved to a different domain. The original domain has new content that isn't being redirected.
  I don't want a blanket rewrite from domain to domain as I have other formats being redirected and need to leave to new content alone.
  The old urls are being redirected with no problem except for 1 batch of static urls with no extension or parameters.</p>
  
  <p>The old url format:</p>
  
  <pre><code>http://olddomain/(variable string)-c2x(variable integers)
  </code></pre>
  
  <p>The new url format:</p>
  
  <pre><code>http://newdomain/(variable string)-c2x(variable integers)
  </code></pre>
  
  <p>The only constant to match is the -c2x so I need to redirect all the urls that match the constant part and wild card the variable parts</p>
  
  <p>I have tried various combinations of rewrite matching including (.<em>)-c2x(.</em>) to rewrite the url to $1-c2x$2 but I am clearly loosing the plot.</p>
  
  <p>What format should I be following for the rule?</p>
  
  <p>Thanks</p>