#1 : 25/04-18 20:50
i'm trying to write a method that will remove hashes from file names that take the form "[XXXXXXXX]", where X can be any number or capital letter. i'm having difficulty. can someone point me in the right direction?
#2 : 26/04-18 00:56
Reply to #1:
Try a RegEx ....
Text to be replaced: (.*)[(.*)](.*)
Replace with: \1\3
Case sensitive: not ticked
Use regular expressions: ticked
Apply to: Name
Or something like that ....
also seems to work. I understand a bit of RegEx but I'm not an expert ... but it's the way to manage this requirement.
#3 : 26/04-18 09:22
Reply to #2:
A Test [XXXXXXXX].ext
B Test [XXXXxxXXXX] Test.ext
C Test [XX12af345bc72daxxxx] Test.ext
A Test .ext
B Test Test.ext
C Test Test.ext
"Remove pattern" method ( https://www.advancedrenamer.com/user_guide/metho d_removepattern )
[√] Use regular expressions
"[" >>> is a special RegEx sign, so we escape it
to say "I want really literately a [-sign" >>> \[
".+" >>> will match one-or-more of any sign, until...
"]" >>>a literately ]-sign is found.
( for some regex-engine this closing bracket also needs to be escaped >> \] ,
but not for ARens regex-engine as it seems )
If this tool had saved you time, perhaps you want to donate an Dollar to Kim?
See http://www.advancedrenamer.com/download >>> [Donate] button.
26/04-18 09:22 - edited 26/04-18 09:23
#4 : 26/04-18 09:54
Reply to #3:
Good one Stefan! I learn again ....
How would \[.+] differ from \[.*]
I haven't got my head around the + vs the * .... I know the "Match 1 or more" vs "Match 0 or more", but they seem to work the same way, mostly.
More importantly, I forgot about the Remove Pattern method :)
26/04-18 09:54 - edited 26/04-18 11:53