[Libreoffice-bugs] [Bug 133084] New: Search & Replace : Replacedoesn't work with positive lookaround regex

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat May 16 11:10:04 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=133084

            Bug ID: 133084
           Summary: Search & Replace : Replacedoesn't work with positive
                    lookaround regex
           Product: LibreOffice
           Version: 6.4.3.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: blank15927 at protonmail.com

Description:
LibreOffice ignores the replacement string when there is a regex positive
lookahead/lookbehind in the search field.

Steps to Reproduce:
1. Open a new ODT file in Writer
2. Type, for example, the following string : abbc
3. Open dialog Search & Replace
4. Regular expression Checked
5. Search for : (?<=a)b
6. Replace with : X (or whatever)


Actual Results:
LibreOffice find the first "b", but do not replace it. Replace is broken.

Expected Results:
Replace the first "b" with "X" : String should be now : aXbc


Reproducible: Always


User Profile Reset: No



Additional Info:

Step 5/6 can be reproduced with a positive lookahead :
Search for : b(?=c)
Replace with : X
Same thing : the string (last "b") is not replaced

-----------------------------

Interesting : negative lookahead/lookbehind work as expected.
Example : (?<!a)b or b(?!c)

-----------------------------

Version: 6.3.4.2 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
Threads CPU : 8; OS : Windows 10.0; UI Render : GL; VCL: win; 
Locale : fr-FR (fr_FR); Langue IHM : fr-FR
Calc: threaded

-- 
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/20200516/d4c4f082/attachment.htm>


More information about the Libreoffice-bugs mailing list