https://bugs.freedesktop.org/show_bug.cgi?id=66208

          Priority: medium
            Bug ID: 66208
          Assignee: [email protected]
           Summary: EDITING backreference in Search must be written with
                    backslash, backreference in Replace must be written
                    with dollar sign
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: Other
            Status: NEW
           Version: 4.0.4.2 release
         Component: Libreoffice
           Product: LibreOffice

New regex engine is great, but backreferences in Search field must be written
with backslash (\1, \2 etc.), while backreferences in Replace field must be
written with dollar sign ($1, $2 etc.).

This is inconsistent and brings confusion to user.

To see what I mean:

1. Create new Writer document. Write "test test"
2. Open search and replace dialog, check "Regular expression"
3. In Search enter:
\b(\w+)\b
in replace:
$1ing
press "Replace all".
You should get "testing testing"
4. In Search enter:
\b(\w+)\b\s*$1
in replace
$1
press "Replace all"
Error will occur that match could not be found.
5. In Search enter
\b(\w+)\b\s*\1
in replace
$1
press "Replace all"
duplicated string will be deleted.

tested under LO 4.0.4, Debian testing amd64.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to