I want a regex that will add ) immediately after the 5th from last word in a filename
I have the following regex
- Code: Select all
Match:
^(.*) ([^ ]+ [^ ]+ [^ ]+ [^ ])
Replace:
\1) \2
with no boxes clicked
What I want it to do is take filenames like:
1stword 2ndword 3rdword 4thword 5thword 6thword 7thword 8thword 9thword.ext
1stword 2ndword 3rdword 4thword 5thword 6thword.ext
1stword 2ndword 3rdword 4thword 5thword 6thword 7thword 8thword.ext
and change them like so:
1stword 2ndword 3rdword 4thword 5thword) 6thword 7thword 8thword 9thword.ext
1stword 2ndword) 3rdword 4thword 5thword 6thword.ext
1stword 2ndword 3rdword) 4thword 5thword 6thword 7thword 8thword.ext
What I have right now does put the ) in the right position but it also removes the last 4 characters of a filename so that I end up with:
1stword 2ndword 3rdword 4thword 5thword) 6thword 7thword 8thword 9th.ext
1stword 2ndword) 3rdword 4thword 5thword 6th.ext
1stword 2ndword 3rdword) 4thword 5thword 6thword 7thword 8th.ext
Can you help me so that only the ) is added in the correct position but no characters are removed? Thanks