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.
"Export matches" is a bit of an exotic feature, and yes the lookaheads and lookbehinds break the export
Fixed! (and backported)
(In reply to Christoph Cullmann from comment #2) > Fixed! (and backported) Fantastic! Thank you very much!