https://bugs.documentfoundation.org/show_bug.cgi?id=107916
Bug ID: 107916
Summary: EDITING: Find & Replace Backreference Fails using
Replace All and \b
Product: LibreOffice
Version: 5.2.6.2 release
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
In certain situations, using a regex with groups and backreferences in Find &
Replace will cause the backreference to insert "$1" instead of the actual text.
Steps to Reproduce:
In Writer:
1. In a document, insert the following text:
.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.
.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
2. In Find & Replace, use the following (with regex activated):
Find: \b([0-9a-f]{32})\b
Replace: $1
3. Note that hitting "Replace" will replace the strings of letters with
themselves as expected. Then note that hitting "Replace All" will replace the
A and B strings with the text "$1".
Replace all results in Writer:
.$1.
.$1
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
Libreoffice Calc performs the "Replace All" as expected:
.AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.
.BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs