title: Replacing based on position in string
body: <p>Is there a way using regex to replace characters in a string based on position?</p>
  
  <p>For instance, one of my rewrite rules for a project I’m working on is “replace <code>o</code> with <code>ö</code> if <code>o</code> is the next-to-last vowel and even numbered (counting left to right).”</p>
  
  <p>So, for example:</p>
  
  <ul>
  <li><code>heabatoik</code> would become <code>heabatöik</code> (<code>o</code> is the next-to-last vowel, as well as the fourth vowel)</li>
  <li><code>habatoik</code> would not change (<code>o</code> is the next-to-last vowel, but is the third vowel)</li>
  </ul>
  
  <p>Is this possible using <code>preg_replace</code> in PHP?</p>