[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shy groups and * ...eh, what?
From: |
Bruno Barbier |
Subject: |
Re: Shy groups and * ...eh, what? |
Date: |
Sat, 22 Oct 2022 13:12:14 +0200 |
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Hello again,
>
> thanks for answers so far. We may want to improve that aspect in the
> docstring of `rx' - but note that the more important question was about
> why "\\`\\(?:ab\\)*\\'" matches "a" - that looks like a bug to me.
>
Looks like a real bug to me too, when using shy groups: it should match
the whole "ab" or nothing, like it does when using implicit or explicit
groups.
And if you request exactly one "a", "a" doesn't match anymore ...
(string-match-p "\\`\\(?:a\\{1\\}b\\)*\\'" "a")
=> nil
I'm getting the same results with emacs 27, emacs 28 and emacs 29.
Shouldn't you use a more alarming title ?
Bruno
- Re: Shy groups and * ...eh, what?, (continued)
- Re: Shy groups and * ...eh, what?, Michael Heerdegen, 2022/10/22
- Re: Shy groups and * ...eh, what?, tomas, 2022/10/24
- Re: Shy groups and * ...eh, what?, Michael Heerdegen, 2022/10/24
- Re: Shy groups and * ...eh, what?, tomas, 2022/10/25
- Re: Shy groups and * ...eh, what?, Emanuel Berg, 2022/10/25
- Re: Shy groups and * ...eh, what?, Emanuel Berg, 2022/10/25
Re: Shy groups and * ...eh, what?, Heime, 2022/10/22
Re: Shy groups and * ...eh, what?, Michael Heerdegen, 2022/10/22
RE: [External] : Shy groups and * ...eh, what?, Drew Adams, 2022/10/22