Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!bawden.eternal-september.org!.POSTED!not-for-mail From: Alan Bawden Newsgroups: comp.lang.python Subject: Re: Correct syntax for pathological re.search() Date: Tue, 08 Oct 2024 16:59:48 -0400 Organization: ITS Preservation Society Lines: 19 Message-ID: <864j5mfgzf.fsf@williamsburg.bawden.org> References: <1e13579f-693d-44cf-a563-7c0c9767e04e@mrabarnett.plus.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Tue, 08 Oct 2024 22:59:49 +0200 (CEST) Injection-Info: bawden.eternal-september.org; posting-host="4ae45db47ca9e6a079bedee79894c981"; logging-data="2444638"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188rKVRF/Kzysos0oABXGD4" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:57lmMGQRfMVHry5xnqrmFdTpcFw= sha1:6atn+IuTCqOgwg8qvnHaELg6iNM= Bytes: 1853 Karsten Hilbert writes: 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 ? You're missing the warning it generates: > python -E -Wonce 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{' :1: DeprecationWarning: invalid escape sequence '\s' >>>