Bug 424540 - Option "regular expression" does not work
Summary: Option "regular expression" does not work
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: AdvancedRename-dialog (other bugs)
Version First Reported In: 6.4.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-22 15:17 UTC by Antonio
Modified: 2022-02-01 06:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 7.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio 2020-07-22 15:17:41 UTC
SUMMARY
In rename panel, backslash is not accepted. For this reason I cannot edit a rename rule such as:
[file]{replace:"m\d\d","new",r}

Other rename rules work fine, including other replacement with regular expressions not using backslash, such as:
[file]{replace:"[a-z]","new",r}

STEPS TO REPRODUCE
1. In miniature mode, select two or more images.
2. Right-click, then Rename
3. In the Rename panel, edit a rename rule with regular expression, such as  [file]{replace:"m\d\d","new",r}

OBSERVED RESULT
The rename rule is edited as [file]{replace:"mdd","new",r}

EXPECTED RESULT
The rename rule is edited as [file]{replace:"mdd","new",r}

SOFTWARE/OS VERSIONS
Linux: Ubuntu 18.04.4 LTS
kernel: Linux 4.15.0-112-generic x86_64

ADDITIONAL INFORMATION
notebook HP Laptop 15-da0986nl 
with keyboard layout IT
Comment 1 Maik Qualmann 2020-07-22 20:15:36 UTC
Git commit 1a75efb008816087a08479cd79c786f7ade794fd by Maik Qualmann.
Committed on 22/07/2020 at 20:12.
Pushed by mqualmann into branch 'master'.

allow backslash for input,
for Windows file system it will be filtered later
FIXED-IN: 7.1.0

M  +2    -1    NEWS
M  +0    -1    core/utilities/advancedrename/advancedrenameinput.cpp

https://invent.kde.org/graphics/digikam/commit/1a75efb008816087a08479cd79c786f7ade794fd