Is there a way using regex to replace characters in a string based on position?
For instance, one of my rewrite rules for a project I'm working on is "replace o with ö if o is the next to last vowel and even numbered (counting left to right)"
So, an example is:
heabatoik would become heabatöik (o is the next to last vowel, as well as the 4th vowel)
habatoik would not change (o is the next to last vowel, but is the 3rd vowel)
Is this possible using preg_replace in PHP?