From: Robert Klemme Date: 2005-08-14T22:31:13+09:00 Subject: Re: YANQ (yet another newbie question): "string"[0.."e"] basi 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