Aha, I knew there was something I was missing in Regexp. Thanks for
confirming. :)

I will get back to my program after work today.

Thanks,
Mitch

On 8/15/05, Pit Capitain <pit / capitain.de> wrote:
> 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
> 
>