[Libreoffice-bugs] [Bug 107916] New: EDITING: Find & Replace Backreference Fails using Replace All and \b
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed May 17 16:56:42 UTC 2017
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: libreoffice-bugs at lists.freedesktop.org
Reporter: rink92 at gmail.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170517/d335119a/attachment.html>
More information about the Libreoffice-bugs
mailing list