[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string search from back to front?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 31 Oct 2013 11:42:05 -0200
> > Just an implementation detail, but I think it would be advisable to tie it
> > to the start of the string, making the case of failed matches much quicker;
> > I believe it produces the same results:
> > print(s:find('^.*()'..w))
>
> Excellent point!
Also, you can use s:match instead of s:find (and then you have only the
position as a result).
-- Roberto