https://bugs.kde.org/show_bug.cgi?id=496460

            Bug ID: 496460
           Summary: Lookarounds break the "export pattern" feature.
    Classification: Applications
           Product: kate
           Version: 24.08.3
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: search
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: qaliboire.bug_rep...@pm.me
  Target Milestone: ---

SUMMARY
When a regular expression search is done using a pattern that includes a
lookaround, the "export pattern" feature outputs the capture pattern entered by
user, instead of the contents of the corresponding capturing group(s).

STEPS TO REPRODUCE
1. open a new editor and type:
1foo
2bar
2. in the "Search" section, do a regular expression search for "(\d)(?=\w+)";
3. right-click in the sub-section that displays the matches and select "Export
matches";
4. type "\1" in the "Export Pattern" field and click on "Generate".

OBSERVED RESULT
The "Result" field shows:
\1
\1

EXPECTED RESULT
We expect the same output as we would get with the pattern "(\d)\w+", i.e.:
1
2

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 40
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Lookbehinds (e.g. "(?<=\d)(\w+)") cause the same problem as lookaheads.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to