Bug 107916 - EDITING: Find & Replace Backreference Fails using Replace All and \b
Summary: EDITING: Find & Replace Backreference Fails using Replace All and \b
Status: RESOLVED DUPLICATE of bug 75806
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Find-Search
  Show dependency treegraph
Reported: 2017-05-17 16:56 UTC by Matthew Rink
Modified: 2019-12-19 09:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Rink 2017-05-17 16:56:42 UTC
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:
    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:

Libreoffice Calc performs the "Replace All" as expected:
Comment 1 Jacques Guilleron 2017-05-19 08:45:36 UTC
Hi rink92,

I reproduce with
LO Build ID: a3100ed2409ebf1c212f5048fbe377c281438fdc
Threads CPU : 2; Version de l'OS :Windows 6.1; UI Render : par défaut; 
Locale : fr-FR (fr_FR); Calc: CL
LO Build ID: d89fa2bd4944625e2dbe56d5709a3f126db24f21
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-05-18_07:09:13
Locale: fr-FR (fr_FR); Calc: CL

Thanks for the report.
Comment 2 QA Administrators 2018-05-20 02:33:29 UTC Comment hidden (obsolete)
Comment 3 Jacques Guilleron 2018-05-20 04:25:48 UTC
Still present with
lo Build ID: 23c5125148a8110d88385b29570bf0b7d4400458
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-05-12_00:15:25
Locale: fr-FR (fr_FR); Calc: CL
Comment 4 QA Administrators 2019-05-21 02:54:14 UTC Comment hidden (obsolete)
Comment 5 Mike Kaganski 2019-12-19 09:45:10 UTC

*** This bug has been marked as a duplicate of bug 75806 ***