[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#31584: 27.0.50; Document again what match re-search-backward finds
From: |
Drew Adams |
Subject: |
bug#31584: 27.0.50; Document again what match re-search-backward finds |
Date: |
Thu, 24 May 2018 17:28:54 -0700 (PDT) |
> It is greedy:
> (with-temp-buffer
> (insert "xxxxyyyy")
> (and (re-search-backward "x+y*" nil t) (match-string 0))) ;=> "xyyyy"
>
> Non-greedy wouldn't match any "y"s. It's a bit tricky to explain both
> correctly and clearly...
Maybe it would help to say that the pattern is always matched in a forward
direction, even when it matches text that is before point.
The pattern itself is not read backward (you don't write +x*y
for the reverse search of x+y*), and it doesn't match backward.
- bug#31584: 27.0.50; Document again what match re-search-backward finds, (continued)
- bug#31584: 27.0.50; Document again what match re-search-backward finds, Noam Postavsky, 2018/05/24
- bug#31584: 27.0.50; Document again what match re-search-backward finds, Michael Heerdegen, 2018/05/24
- bug#31584: 27.0.50; Document again what match re-search-backward finds, Noam Postavsky, 2018/05/24
- bug#31584: 27.0.50; Document again what match re-search-backward finds, Eric Abrahamsen, 2018/05/24
- bug#31584: 27.0.50; Document again what match re-search-backward finds, Michael Heerdegen, 2018/05/24
- bug#31584: 27.0.50; Document again what match re-search-backward finds, Noam Postavsky, 2018/05/24
- bug#31584: 27.0.50; Document again what match re-search-backward finds, Michael Heerdegen, 2018/05/24
- bug#31584: 27.0.50; Document again what match re-search-backward finds, Eli Zaretskii, 2018/05/25
- bug#31584: 27.0.50; Document again what match re-search-backward finds, Noam Postavsky, 2018/05/25
- bug#31584: 27.0.50; Document again what match re-search-backward finds, Eric Abrahamsen, 2018/05/24
- bug#31584: 27.0.50; Document again what match re-search-backward finds,
Drew Adams <=