Bug 424540

Summary: Option "regular expression" does not work
Product: [Applications] digikam Reporter: Antonio <antonio.angelo>
Component: AdvancedRename-dialogAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 6.4.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 7.1.0
Sentry Crash Report:

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