Need help Removing spaces within [] brackets

Advanced Renamer forum
#1 : 27/04-19 02:51
Brendon Parin
Brendon Parin
Posts: 2
I've tried several way of working around this, but to no avail:

Basically I need for a folder to:

[Detective Comics Vertigo imprint] - Fables - y000 m0 d0 - Babes in Toyland
[
to

[DetectiveComicsVertigoimprint] - Fables - y000 m0 d0 - Babes in Toyland

Just remove the spaces within the brackets.

Thanks.


27/04-19 02:51
#2 : 27/04-19 10:54
David Lee
David Lee
Posts: 1125
That was a challenge and a half - but the solution looks surprisingly simple!

Use the Replace method with the following Regular Expression:

" (?=.*\])"

Replace with a blank and set Occurence: "All".

Note that the RegEx starts with a space and don't include the quotes.

It uses a "lookahead" to match every space that is followed by a string of characters ending in "]"




27/04-19 10:54 - edited 27/04-19 22:05
#3 : 28/04-19 04:07
Brendon Parin
Brendon Parin
Posts: 2
Reply to #2:

Thanks. Worked like a Charm.


28/04-19 04:07