Bug Hunting Session
Bug 107916 - EDITING: Find & Replace Backreference Fails using Replace All and \b
Summary: EDITING: Find & Replace Backreference Fails using Replace All and \b
Status: NEW
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-05-21 02:54 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
Dear Matthew Rink,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team