Page 1 of 1

Moving part of a file name

PostPosted: Sat Jun 19, 2021 12:35 pm
by Alice
Hello all and I hope everyone is well.

Simple one for the 'brainboxes' out there (I hope) !

I need to change this format :

Pending Decision List 5 March 2021 (Week 9) - Amenities.pdf
Pending Decision List 5 March 2021 (Week 9) - With Outcomes.pdf

to this arrangement/move of words :

(Week 9) - Pending Decision List 5 March 2021 - Amenities.pdf
(Week 9) - Pending Decision List 5 March 2021 - With Outcomes.pdf

I have taken a shufty at the BRU manual, but I still don't understand how to do this :cry:


Any help would be greatly appreciated.


Alice

Re: Moving part of a file name

PostPosted: Sat Jun 19, 2021 5:45 pm
by Luuk
This some different ways inside of the Regex(1) with a 'Match' and 'Replace' like ...
(.*) (\(.+\))( - .+)
\2 - \1\3

(.*) (\(.+\))(( - ).+)
\2\4\1\3

Or with putting a checkmark in 'Simple', who needs these 'brainboxes' anyway? ...
%1 (%2)%3
(%2) - %1%3

Re: Moving part of a file name

PostPosted: Sat Jun 19, 2021 7:28 pm
by Alice
Wow ! Amazed. Thank you.

The first two examples look a lot like the result after my pet Cat has 'walked across my keyboard', pressing random keys with his paws (....all too frequent, and possibly attention seeking, event) !

But the third 'Simple' example makes sense to me and I can 'reverse engineer' your answer and combine it with the Help file guidance to understand how to apply the syntax in future.

Many many thanks Luukand enjoy your day/evening.