[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How to match a character limited substring
- From: meino.cramer@...
- Date: Mon, 28 Oct 2013 05:11:15 +0100
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