RegEx Rename fail in 4.3

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

User avatar
nikos
Site Admin
Site Admin
Posts: 14477
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: RegEx Rename fail in 4.3

Post by nikos » 2019 Nov 27, 16:40

must be because I don't think I can change anything more about it :shrug:

hajubu
New Member
Posts: 8
Joined: 2016 Aug 25, 06:40

Re: RegEx Rename fail in 4.3

Post by hajubu » 2019 Dec 01, 22:26

Hello @nikos , @longfellow

just as a hint for using quoted characters ( \Q , \L ,\U .... \E ) with Mtrace of DEELX :: it works as it should.
here (K.I.S.S) simple sample
pattern: exact match (\Q(a*b)\E)([A-Z]) working on (a*b)AAA result is "___Match!"
pattern: lower match (\L(A*B)\E)([A-Z]) working on (a*b)AAA result is "___Match!"
pattern: upper match (\U(a*b)\E)([A-Z]) working on (A*B)AAA result is "___Match!"

pattern: exact match (\Q(a*b)\E)([A-Z]) working on (A*B)AAA result is "_noMatch!"
pattern: lower match (\L(A*b)\E)([A-Z]) working on (A*b)AAA result is "_noMatch!"
pattern: upper match (\U(a*b)\E)([A-Z]) working on (A*b)AAA result is "_noMatch!"

(I did not all variations for clarity,
It shows however that the "Quoted Characters" works on "Matching-Mode/Input" and not for changing the Output chars ($1,$2,$+)
The main purpose is :: metacharacters can be handled like the common characters
i.e. \Q(a+b)*3\E :: matches "(a+b)*3".
and without quoting :: \(a\+b\)\*3 :: Without \Q...\E, we need to escape each special character.

i.e. Quote (disable) pattern metacharacters from \Q till \E. ( see my samples the grouping brackets () are handled as common characters.


If begins with \U (or \L), ends with \E, it will quote (disable) pattern metacharacters from \U (\L) till \E ,
and all lowercase (uppercase) alphas between them will be turned into uppercase (lowercase)
before "comparison" for matching purpose starts.
See also here the sample figures.

Image
Image
Image
Image
Image
Image
image uploader

Post Reply