basi <basi_lio / hotmail.com> wrote:
> To Joel V and William J.
> I didn't think this was possible and I'm glad I asked. I'm impressed!
> Thanks for the help.
> basi

Interestingly nobody seems to care to anchor the expression at the beginning 
of the string.  Here are other variants that do this

>> "astring"[/\A[^r]*/]
=> "ast"
>> "astring"[/\A.*?(?=r)/]
=> "ast"
>> "astring".match(/\A.*?(?=r)/)[0]
=> "ast"

Kind regards

    robert