Bug 111646 - F&R: Trying to replace text found with Regular Expression using zero-length-assertions $1 and respective is wrongly taken for literal
Summary: F&R: Trying to replace text found with Regular Expression using zero-length-a...
Status: RESOLVED DUPLICATE of bug 65038
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-08-10 16:03 UTC by Wolfgang Jäger
Modified: 2019-12-19 09:52 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:

The example mentioned in the original bug report (30.13 KB, application/vnd.oasis.opendocument.text)
2017-08-10 16:03 UTC, Wolfgang Jäger

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Jäger 2017-08-10 16:03:39 UTC
Created attachment 135421 [details]
The example mentioned in the original bug report

Searching for text using zero-length-assertions both sides and trying to replace then using $1 and so on as implicit variablles for found groups results in different errors under certain conditions. 
-1- 'Find Next' and subsequent 'Replace': No action.
-2- 'Replac All': The group variables are wrongly inserted as literals.

SAME replacements in Calc are done as expeczed.
Steps to reproduce: Too many, to difficult (for me) to describe unambiguously.

See attached example.
Comment 1 Buovjaga 2017-08-28 18:15:41 UTC

For testers:

Find: (?<=\W)0([0-9]+)(?=\W)
Replace with: lz_$1

Arch Linux 64-bit, KDE Plasma 5
Build ID: 20b7b15038d0970de1c271238b9aef7cbd3930ac
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on August 27th 2017
Comment 2 QA Administrators 2018-08-29 02:42:47 UTC Comment hidden (obsolete)
Comment 3 Wolfgang Jäger 2018-12-31 17:03:19 UTC
Tested today with LibO V and with LibO (Dev) V  
Both these versions still suffer from the problem.
Comment 4 Wolfgang Jäger 2019-05-02 08:13:49 UTC
Just tested with LibO V Writer: Bug still present as described.
Comment 5 Mike Kaganski 2019-12-19 09:52:19 UTC

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