When the target of a regex replace contains a comment, the literal text of the replace field is inserted instead of the backreferences, i.e. “$1 $2” is inserted instead of the text found.
Steps to Reproduce:
1. Start with a document containing sentences ending with a full stop followed by a single space
2. Search & Replace with regex (+ case matching)
If the match contains a comment, the text “$1 $2” is inserted instead of the backreferences to the matched text.
The backreferenced text should be inserted (including the comment) as it is with matches that don’t contain a comment.
User Profile Reset: No
OpenGL enabled: Yes
Version: 220.127.116.11 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ga-IE (ga_IE.UTF-8); UI: ga-IE
Created attachment 176391 [details]
Simple test document
Version: 18.104.22.168.alpha0+ / LibreOffice Community
Build ID: e9332dcdc8f2ea268d1b17c73d43a8834cf75365
CPU threads: 10; OS: Mac OS X 12.0.1; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US