Path: ...!npeer.as286.net!npeer-ng0.as286.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Pieter van Oostrum Newsgroups: comp.lang.python Subject: Re: Correct syntax for pathological re.search() Date: Tue, 08 Oct 2024 19:50:14 +0200 Lines: 11 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Trace: individual.net VlLsFWOmrhTZ4IJJdM5Tgw2SLuJX+lxPlQtIizELhWvTOO2e5o Cancel-Lock: sha1:DKPqgxCoAJRgl9/Gj7QFBzI32A8= sha1:w/Vh1FUcSbnRsYOfnHPs8+ef0Kw= sha256:VlU00b7Z4XQpQnq0aceBmwq+v792UKzqG+IPj2oD9Y4= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) Bytes: 1252 ram@zedat.fu-berlin.de (Stefan Ram) writes: > "Michael F. Stemper" wrote or quoted: > > path = r'C:\Windows\example' + '\\' > You could even omit the '+'. Then the concatenation is done at parsing time instead of run time. -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4]