[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in
From: |
Eli Zaretskii |
Subject: |
bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value |
Date: |
Tue, 25 Jun 2019 18:26:22 +0300 |
> From: Mattias Engdegård <mattiase@acm.org>
> Date: Tue, 25 Jun 2019 14:01:49 +0200
>
> (replace-regexp-in-string "a" "X" "abcab" t t nil 2)
>
> would be expected to return
>
> "abcXb"
>
> but the actual return value is
>
> "cXb"
>
> This was probably not intended. The manual text is
>
> This function copies STRING and searches it for matches for REGEXP,
> and replaces them with REP. It returns the modified copy. If
> START is non-‘nil’, the search for matches starts at that index in
> STRING, so matches starting before that index are not changed.
>
> The question is whether it is too late to fix the bug, or if it needs to be
> documented.
Both, I think ;-)
Thanks.
- bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value, Mattias Engdegård, 2019/06/25
- bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value,
Eli Zaretskii <=
- bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value [PATCH], Mattias Engdegård, 2019/06/26
- bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value [PATCH], Lars Ingebrigtsen, 2019/06/26
- bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value [PATCH], Robert Pluim, 2019/06/26
- bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value [PATCH], Lars Ingebrigtsen, 2019/06/26
- bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value [PATCH], Drew Adams, 2019/06/26
- bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value [PATCH], Eli Zaretskii, 2019/06/26
- bug#36372: 27.0.50; replace-regexp-in-string skips START first chars in return value [PATCH], Mattias Engdegård, 2019/06/26