Problem with standard regex

Kornel Benko kornel at lyx.org
Sat Jan 2 11:47:13 UTC 2021


Given the string
	t = "\foreignlanguage{russian}{\texttt{\label}"
and trying to use
	"regex_replace(t, t,
	"\\\\(emph|noun|text(bf|sl|sf|it|tt)|(u|uu)line|(s|x)out|uwave)(\\{(\\{\\})?\\})+",
	"")
leads to regex-exception.
Anything other than "\label" works. (e.g. "\xyzzy" or "\lxabel", or "\labelx")

Does anyone know, what's going on here?
(It does not even depend on "\texttt", because already
	t = "\foreignlanguage{russian}{\label"
leads to the exception.

	Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210102/2c9f4212/attachment.asc>


More information about the lyx-devel mailing list