| Deutsch English Français Italiano |
|
<backslashes-20241008203026@ram.dialup.fu-berlin.de> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feeds.phibee-telecom.net!news.mixmin.net!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: Correct syntax for pathological re.search()
Date: 8 Oct 2024 19:32:04 GMT
Organization: Stefan Ram
Lines: 18
Expires: 1 Jul 2025 11:59:58 GMT
Message-ID: <backslashes-20241008203026@ram.dialup.fu-berlin.de>
References: <ve0o34$1nep4$1@dont-email.me> <c56c0689-e248-488f-af52-e9de2a454318@mrabarnett.plus.com> <mailman.9.1728414704.4695.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de vnKDXBCzZ4QJSqzm20z33A1T5LSLHwdL4bxF/MidnjiHVC
Cancel-Lock: sha1:+hk7RMk6YB2hZpt8eAGR7CdhM+0= sha256:w3ibQX23dsRZNmgY7EHLCfhCeAqMZPhjnK7pa/B58vo=
X-Copyright: (C) Copyright 2024 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Bytes: 1956
MRAB <python@mrabarnett.plus.com> wrote or quoted:
>However, regex also uses backslash as an escape character.
TeX also uses the backslash as an escape character:
\chardef \\ = '\\
, the regular expression to search exactly this:
\\chardef \\\\ = '\\\\
, and the Python string literal for that regular expression:
"\\\\chardef \\\\\\\\ = '\\\\\\\\".
. Must be a reason Markdown started to use the backtick!