[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15107: [PATCH] Add replace-regexp-in-string regression test
From: |
Noam Postavsky |
Subject: |
bug#15107: [PATCH] Add replace-regexp-in-string regression test |
Date: |
Wed, 31 Aug 2016 11:13:05 -0400 |
On Wed, Aug 31, 2016 at 11:01 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Erik Anderson <erikbpanderson@gmail.com>
>> Date: Wed, 31 Aug 2016 14:36:06 +0000
>> Cc: 15107@debbugs.gnu.org
>>
>> Per the replace-regexp-in-string docstring: "Replace all matches for REGEXP
>> with REP in STRING."
>
> Yes, and there is a single match in this case, so a single
> replacement. The _entire_ input string matches the regexp, so after
> that match there's nothing else left to match.
>
> What am I missing?
"^." matches only the first character of "foo bar", but maybe you have
a different idea of "matches" than I do. I would consider "^..*" to
match the whole string.