Mitch Tishmack schrieb: > In short I see this behavior: > > "Stuhlu".sub(/u/,'üÊ) > => "Stlu" > "Stuhlu".reverse.sub(/u/,'üÊ).reverse > => "Stuhl\274\303" > "Stuhlu".reverse.sub(/u/,'üÊ).split(//).reverse.join > => "StuhlüÅ > > The general goal is to sub the final "u" in that word with an umlauted > version and not the first. > ... > Am I mising a > Regexp option that would make the final match work? Can't help with the reverse behaviour, but if you want to substitute single letters only the following regexp should work: "Stuhlu".sub(/u(?=[^u]*$)/,'üÊ) Regards, Pit