help.. replacing word after character repetition

Advanced Renamer forum
#1 : 09/05-20 13:28
sopo jarwo
sopo jarwo
Posts: 2
i have file list like this

190909 7014975_h0 23213 entire word.jpg
190909 702175_h0 652285 word need to delete.jpg
190909 702175_h1 652285 word need to delete.jpg
190909 7032325_h0 982124 random word.jpg

how to make new file name like this or maybe replace to new name after that

190909 7014975_h0 23213.jpg
190909 702175_h0 652285.jpg
190909 702175_h1 652285.jpg
190909 7032325_h0 982124.jpg

as you can see i need to replace word after 3 space repetition
can somebody help??

09/05-20 13:28
#2 : 09/05-20 15:10
David Lee
David Lee
Posts: 447
You can use this regular expression in a "Replace" or "Remove pattern" method:

.*? .*? .*?\K .*

If you use "Replace" then be sure to select 1st occurrence.

Each instance of ".*? " will match a string of characters up to and including the next space and the the final ".*" adds the remaining characters to the match.

Inserting "\K" is an instruction to forget everything that has been matched up to that point - leaving only the character string starting with the 3rd space to be removed or replaced.

Note that the "?" instructs the "*" modifier to match the minimum number of characters necessary.

There is an introduction to the use of regular expressions in the user guide:
However the list of metacharacters in the guide does not include "\K" or this special use of "?".

09/05-20 15:10 - edited 09/05-20 15:11
#3 : 10/05-20 12:05
sopo jarwo
sopo jarwo
Posts: 2
Reply to #2:
thank you very much!

10/05-20 12:05