lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> -----Original Message-----
> From: []
> On Behalf Of Roberto Ierusalimschy
> Sent: Thursday, March 10, 2011 3:00 PM
> To: Lua mailing list
> Subject: Re: How to extract a word at a given position in a string?
> What is wrong with reversing the string ('string.reverse')?
> -- Roberto

[BG] Reversing the string is fine when it is rather small (which is my case).
However, I suppose one can encounter a situation where a large text has to be searched,
and there is no easy means of extracting a small portion to search in. In that case,
duplicating the whole text, and searching through it, is expensive.
I was just wondering if there was a possibility to apply all pattern matching functions
in the reverse direction.