Page 1 of 1

Batch Rename with RegEx Substitutions and Flags

Posted: Tue Jul 03, 2018 11:11 am
by kweso
Hey,
i have filenames like "Some_Projectname 23.YYYYMMDDCxyz.C12v08.final_new.psd".

All i need from this is the project name and the Chapter and Version (C12v08) -part of it. So i tried RexEx search.
I did:
([a-zA-Z\s_-]+)(.)*(c[0-9]+v[0-9]+)(.)*

First problem: since the chapter "C" and version "V" cases are not consistent. So I need \i. How do i set flags in xnviews renamer? (BTW: the checkbox for case in the UI does not help).

Second problem:
I tried "$1_$3.psd" but the $x's are not interpreted.

Thanks for any hint,
kws

Re: Batch Rename with RegEx Substitutions and Flags

Posted: Tue Jul 03, 2018 2:27 pm
by xnview
i use this and \i is not supported directly

Re: Batch Rename with RegEx Substitutions and Flags

Posted: Wed Dec 09, 2020 12:06 am
by surfalot
I'm having the same problem as the OP's second issue above.
I understand RegEx. The QRegExp Class you refer to infers we can use

Code: Select all

$1
to reuse captured text in the replace field. It's a normal thing.
1) did you implement the capture functions?
2) is it supposed to still be

Code: Select all

$1, $2, $3
, etc.?
Of course the reason I'm asking is most likely the same as @kweso, it is not working.
Please impart me some info on this topic.