lua-users home
lua-l archive

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


Hi,

There is a long string, which contains tokens, which are limited by
'%'-signs. The '%'s are not contained in the tokens. All other
characters (except of newline characters) can be part of the tokens.

The tokens are to be completed from incomplete input.

Example:

String::

%Zappa%Clapton%Hendrix%Rhianna%

Input:

'pton'

Plan:
search for 'pton' in the token string.
then match with string.match and %b%%.

Problem:
How can I start string.match at a certain position
without copying the token string or greater parts of
it around?

Thank you very much in advance for any help!

Best regards,
mcc