Sujet : Re: Correct syntax for pathological re.search()
De : Karsten.Hilbert (at) *nospam* gmx.net (Karsten Hilbert)
Groupes : comp.lang.pythonDate : 08. Oct 2024, 22:17:49
Autres entêtes
Message-ID : <mailman.10.1728418673.4695.python-list@python.org>
References : 1 2 3 4
Am Tue, Oct 08, 2024 at 08:07:04PM +0100 schrieb MRAB via Python-list:
unwanted_tex = '\sout{'
if unwanted_tex not in line: do_something_with_libreoffice()
>
That should be:
>
unwanted_tex = r'\sout{'
Hm.
Python 3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> tex = '\sout{'
>>> tex
'\sout{'
>>>
Am I missing something ?
Karsten
-- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B