On 6/2/07, Bertram Scharpf <lists / bertram-scharpf.de> wrote:
> Hi,
>
> Am Freitag, 01. Jun 2007, 22:10:51 +0900 schrieb Leonard Chin:
> > On 6/1/07, Harry Kakueki <list.push / gmail.com> wrote:
> > >str =~ /(.{1,10}$)/
> >
> > This works nicely if you do this:
> > str[/(.{1,10}$)/]
>
>   str[/(.{1,10}\z)/]
>
> is what the OP meant.

That is a great answer too :)
I guess the OP didn't mention newlines, so \z works better.