[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scan of regexps in emacs
From: |
Clément Pit-Claudel |
Subject: |
Re: Scan of regexps in emacs |
Date: |
Sun, 10 Mar 2019 22:56:17 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
On 10/03/2019 22.45, Paul Eggert wrote:
> - (while (string-match (concat "\\(^" comint-prompt-regexp
> + (while (string-match (concat "\\(" comint-prompt-regexp
> "\\)\\1+")
> string)
I think your change altered the meaning of that regexp. Was that intentional?
Or am I misunderstanding? The manual says this:
For historical compatibility reasons, ‘^’ can be used only at the beginning
of the regular expression, or after ‘\(’, ‘\(?:’ or ‘\|’.
…and indeed (string-match-p "\\(^abc\\)" "xabc") is nil but (string-match-p
"\\(abc\\)" "xabc") is 1.
Clément.