Page 1 of 1

RegEx and Lists

PostPosted: Sat Feb 10, 2024 11:34 pm
by TaketaD
At the moment I'm using the RegEx field to find and move a given word to the beginning of file name, using this:

Code: Select all
(?i)(^|.+) Word( .+|$)
Word - \1\3
Based on help received HERE

What I'd like to be able to do instead, if possible, is to maintain a list of Words would then be used here instead of an individual Word. For example, in my list I'd have Apple, Orange, Banana and the above RegEx would look for each of those words and, if found, move it to the beginning of the filename. As time goes on I could just add a new word to the list. This would save me the trouble of needing to execute this regex on each Word individually, as my list is growing quite lengthy.

Re: RegEx and Lists

PostPosted: Sun Feb 11, 2024 5:20 am
by Admin
Probably best to do this with a Javascript script in BRU, if you have a commercial license....

Re: RegEx and Lists

PostPosted: Fri Feb 16, 2024 6:22 am
by TaketaD
Oh boy, I'm extremely rusty with my JS. But what does a commercial license have to do with anything?

Re: RegEx and Lists

PostPosted: Sat Feb 17, 2024 1:25 am
by Admin
At the moment JavaScript renaming in Bulk Rename Utility is only available with a commercial license. We can help write the script.