[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shy groups and * ...eh, what?
From: |
tomas |
Subject: |
Re: Shy groups and * ...eh, what? |
Date: |
Sat, 22 Oct 2022 08:39:02 +0200 |
On Sat, Oct 22, 2022 at 06:24:39AM +0200, Michael Heerdegen wrote:
> Hello,
>
> I wanted to be sure I correctly understood that if you give multiple RX
> arguments to the `rx' `*' operator, they are implicitly interpreted as a
> sequence (AFAIU, that's the case. An implicit `or' would also make
> sense, that's why I wondered).
I didn't try to repeat your examples, but you are right: there is at least
a big smoking hole in the docs: all of the repetition operators seem to
take zero (one?) or more arguments according to the syntax shorthand, but
the text refers to just one term, like here:
‘(zero-or-more RX...)’
‘(0+ RX...)’
Match the RXs zero or more times. Greedy by default.
Corresponding string regexp: ‘A*’ (greedy), ‘A*?’ (non-greedy)
...what is this `A' the text is referring to? Your experiments suggest
that it is the sequence of the `RX...' in the syntax shorthand (i.e.
(seq RX...), but the docs just leave it open :)
Cheers
--
t
signature.asc
Description: PGP signature
- Shy groups and * ...eh, what?, Michael Heerdegen, 2022/10/22
- Re: Shy groups and * ...eh, what?, Heime, 2022/10/22
- Re: Shy groups and * ...eh, what?,
tomas <=
- 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