------ art_39630_20128236.1153999692393 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 7/27/06, Pit Capitain <pit / capitain.de> wrote: > > Robert Dober schrieb: > > I came up with the perfect solution to replace the last occurence of a > > pattern (if it is simple, thus not of any interest to the OP of the OT). > > (...) > > Is there a way to anchor on the end of the string in multiline strings. > > Robert, that's \z. See for example > > http://phrogz.net/ProgrammingRuby/language.html#regularexpressionpatterns > > Regards, > Pit > > Thanks I *should* have found it, but of course now reverse.sub.reverse is much faster again !!! Nevertheless it behaves correctly and reasonably fast. Thanks again. Robert -- Deux choses sont infinies : l'univers et la bóŐise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------ art_39630_20128236.1153999692393--