Rename with RegEx feature

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
irinaonline
Posts: 7
Joined: Fri Jan 26, 2018 8:38 pm

Rename with RegEx feature

Post by irinaonline »

I have tried a lot of different syntaxes, however, it never works.

I would like to rename multiple files with "everything until } (closed bracket)". A closed bracket is part of these filenames.

What is the correct syntax to write in the field "New Syntax" with the checkbox "Regex" checked?
void
Developer
Posts: 16751
Joined: Fri Oct 16, 2009 11:31 pm

Re: Rename with RegEx feature

Post by void »

Please try the following old format:

^(.*?)}(.*?)$

^ = match the start of the filename.
(.*?) = match any character, any number of times and save the match into variable 1.
} = match a literal }
(.*?) = match any character, any number of times and save the match into variable 2.
$ = match the end of the filename.

Please try the following new format:

new text}\2

\2 = recall the match in variable 2.
remove the } if it is not needed
Post Reply