[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Inconsistency with the manual
- From: Martin <eden_martin_fuhrspam@...>
- Date: Wed, 11 Oct 2017 02:54:02 +0100
On 10/10/2017 10:43 PM, Soni L. wrote:
> However, I noticed something kinda weird:
>
> string.match("''", "%f[']'", 2) --> nil
> string.match("''", "^'", 2) --> '
string.match("''", "%f[']'", 2). From position 2 of string [['']]
locate to index <i> such that s[i] ~= [[']] and s[i + 1] == [[']] and
s[i + 1] == [[']].
There is no such index so nil is returned. In case of string [['' ']]
there is match.
string.match("''", "^'", 2). From position 2 of string [['']] find
string [[']]. Do not skip characters (due "^" anchor). This matches
[[']], second apostrophe.
-- Martin