Subject: 27.1; [PATCH] signal in `replace-regexp-in-string'
From: Shigeru Fukaya <[email-masked]>
To: [email-masked]
Date: Wed, 25 Nov 2020 13:02:11 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

`replace-regexp-in-string' sometimes signals an error when REGEXP
contains some bondary sequence.  Difference of searches between
against an original passed string and against an extracted substring
causes the incident.

(replace-regexp-in-string-simple "a\\B" "A" "a aaaa")
	error --> cons: Args out of range: 2, 3
    expected
	==> "a AAAa"

(replace-regexp-in-string "\\Ba" "A" "a aaaa")
	error --> cons: Args out of range: 3, 4
    expected
	==> "a aAAA"

--
Shigeru