[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : [PATCH] Interpret #r"..." as a raw string
From: |
Andreas Schwab |
Subject: |
Re: [External] : [PATCH] Interpret #r"..." as a raw string |
Date: |
Fri, 26 Feb 2021 21:34:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1.91 (gnu/linux) |
On Feb 27 2021, Naoya Yamashita wrote:
> If I wrote test string with raw-string notation, it shold be below.
>
> (should (equal
> (let ((str #r"(def\macro leaf () nil)"))
> (string-match #r"(\(def\macro\) \([^ ]+\)" str)
> (list (match-string 1 str) (match-string 2 str)))
> '(#r"def\macro" "leaf")))
>
> Wow, this is easy to understand. We can now write the matching
> string as a literal as is!
\m is not a valid regex escape. It surely won't match a backslash.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
- [PATCH] Interpret #r"..." as a raw string, Naoya Yamashita, 2021/02/26
- RE: [External] : [PATCH] Interpret #r"..." as a raw string, Drew Adams, 2021/02/26
- Re: [External] : [PATCH] Interpret #r"..." as a raw string, Naoya Yamashita, 2021/02/26
- RE: [External] : [PATCH] Interpret #r"..." as a raw string, Drew Adams, 2021/02/26
- Re: [External] : [PATCH] Interpret #r"..." as a raw string, Stefan Monnier, 2021/02/26
- Re: [External] : [PATCH] Interpret #r"..." as a raw string, Naoya Yamashita, 2021/02/26
- Re: [External] : [PATCH] Interpret #r"..." as a raw string,
Andreas Schwab <=
- Re: [External] : [PATCH] Interpret #r"..." as a raw string, Naoya Yamashita, 2021/02/26
- Re: [External] : [PATCH] Interpret #r"..." as a raw string, Andreas Schwab, 2021/02/26
- Re: [External] : [PATCH] Interpret #r"..." as a raw string, Naoya Yamashita, 2021/02/26
- Re: [External] : [PATCH] Interpret #r"..." as a raw string, Andreas Schwab, 2021/02/26
- Re: [External] : [PATCH] Interpret #r"..." as a raw string, Eli Zaretskii, 2021/02/26
- Re: [External] : [PATCH] Interpret #r"..." as a raw string, Naoya Yamashita, 2021/02/26
Re: [PATCH] Interpret #r"..." as a raw string, Andreas Schwab, 2021/02/26
Re: [PATCH] Interpret #r"..." as a raw string, Eli Zaretskii, 2021/02/26