Hi all, am using a regex (in php), but I'm all confused.
I'm trying to replace a string ('di') with 'deu'. SImple enough, but I don't want a replacement if 'di' is preceded by 'io' as in 'iodine', 'iodic', 'iodide' etc.
This is what I have:
It works fine for everything, but unfortunately it doesn't stop the 'iodi' from becoming 'iodeu'. Any light on this would great. Thank you.
I'm actually trying to create a chemical translation function, which means 'di' as in 'two of' should change to 'deu', but everything else should not change.
Unfortunately, I've found '..thiodi..' which should change to '..thiodeu..', just to complicate matters.
So 'di' and 'thiodi' should be replaced but not 'iodi'.
This works as expected.
Edited 5 Years Ago by diafol: n/a