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:35:14 -0700 (PDT)
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
Here is the pattern after `remove_re:gsub("\n", "\\n")` that I'm now
looking at your tool:
====
\n\n\nCuentas Anuales%. Ejercicio %d+
+Pág%. %d+\n CUENTAS ANUALES DE LA ADMINISTRACIÓN
GENERAL DE LA COMUNIDAD DE CASTILLA Y LEÓN%. EJERCICIO %d+\n\n\nEJECUCIÓN
DEL PRESUPUESTO DE GASTOS DEL EJERCICIO %d+\nGASTOS POR
APLICACIÓN\nADMINISTRACIÓN GENERAL[^\n]*\n[^\n]+\n\n[^\n]+\n\n
====
On Tuesday, May 12, 2026 at 2:21:24 PM UTC+2 Spar wrote:
> Correction. It's not actually the \n. It's because you used `[[ ]]` string
> literals which works as C++ raw literals. They don't accept escapes.
>
> So what actually happens can be described by my tool which doesn't accept
> escapes too (i will fix it some day) :-)
>
> https://gitspartv.github.io/lua-patterns/?pattern=%5B%5E%5Cn%5D*
> On May 12, 2026 at 15:20 +0300, Luiz Henrique de Figueiredo <
> [email protected]>, wrote:
>
> Try this simple pattern
>
> local remove_re = "Cuentas Anuales.-CREDITO%s+"
>
> --
> 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/CABt16qnGEsb6UYWW66PHzj6gey5g9AqWUCHpB7_zYA8P6N8Zag%40mail.gmail.com
> .
>
>
--
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/76a4e976-febc-4dfd-a3c6-ee1ff9014bedn%40googlegroups.com.