[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PATCH] lstrlib and match() \0 in pattern strings
- From: Patrick Donnelly <batrick@...>
- Date: Fri, 12 Mar 2010 17:43:39 -0500
On Fri, Mar 12, 2010 at 5:39 PM, Rene Rebe <rene@exactcode.de> wrote:
> Hi all,
>
> I was just drafting some code filtering arbitrary binary data input, relying on Lua strings to handle embedded zeros. While I had no problems with that in the past, I just spotted the pattern of the matching does treat the first \0 as the end of the pattern. I hope I did not over-read a subtile area of the Lua manual that points out embedded zeros are not allowed in the string library pattern matching so that those examples should work as I would expect:
See the character class %z in the Lua manual which matches the nul character.
--
- Patrick Donnelly