Re: I think I found a bug in Lua string.patterns, can anyone help see if it's true ?
Domingo Alvarez Duarte <[email protected]> Tue, 12 May 2026 05:19:47 -0700 (PDT)
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
I agree with you that '[^\n]*` will match as much as possible but never anything with '\n' On Tuesday, May 12, 2026 at 2:16:28 PM UTC+2 Spar wrote: > A assume `[^\n]*` is what eating up half of the text. > > * — Quantifier (zero or more). Allows to match the pattern zero or more > times. This will match the longest sequence. > On May 12, 2026 at 15:13 +0300, Domingo Alvarez Duarte <[email protected]>, > wrote: > > > What I expect and what I've got is in the first message, the gist has one > extra similar string that somehow get processed properly but the other > don't. > I was expecting 5 non blank lines in the output but I'm getting only 3. > On Tuesday, May 12, 2026 at 2:06:19 PM UTC+2 Luiz Henrique de Figueiredo > wrote: > >> > While doing some text replacements I found an unexpected behavior >> >> What did you expect and how does it differ from what you got? >> > -- > > > You received this message because you are subscribed to the Google Groups > "lua-l" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > To view this discussion visit > https://groups.google.com/d/msgid/lua-l/6f688a45-3a12-4343-b0d1-0816e29ffb56n%40googlegroups.com > <https://groups.google.com/d/msgid/lua-l/6f688a45-3a12-4343-b0d1-0816e29ffb56n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/7f520f25-29c4-424c-a2d3-c30cddced2den%40googlegroups.com.