title: .htaccess regex url redirection
body: <p>I'm looking for a regular expression for a .htaccess file where I can redirect one URL to another.</p>
  
  <p>URL1:
  /dir/an-article-title-<strong>222</strong></p>
  
  <p>URL2:
  /dir/<strong>222</strong>/an-article-title</p>
  
  <p>I would like URL1 to 301 redirect to URL2.</p>
  
  <p>In highlevel language, I think I want to tell .htaccess to:</p>
  
  <ol>
  <li>Take the digits after the last dash (-)</li>
  <li>Put those digits before the article name with a trailing slash, i.e. 222/</li>
  <li>Remove the last dash and digits from the article name</li>
  </ol>
  
  <p>Any thoughts, suggestions, code are welcome!</p>