I have a series of files named like....
Name Surname Word Word Word .... and I want to insert " - " between "Surname" and first "Word" thus....
Name Surname - Word Word Word .... there could many "Word"s in the name
Using regex
TIA
i tried
.* .* .*
$1 $2 - $3
MultiRename a series of files with regex
Moderators: Hacker, petermad, Stefan2, white
MultiRename a series of files with regex
Last edited by louwin on 2024-02-12, 01:01 UTC, edited 1 time in total.
There are 10 types of people in the world,
Those who understand binary and those who don't.
Those who understand binary and those who don't.
Re: MultiRename a series of files with regedit
RegEx.
Search for: '(?<=^\S+ \S+)'
Replace with: ' -'
Last edited by Fla$her on 2024-02-11, 04:46 UTC, edited 4 times in total.
Overquoting is evil! 👎
Re: MultiRename a series of files with regedit
Wow! I whole lot more complex than I expected but THANKS 
BTW - your solution puts a "-" after the name but I can fix that with another simple edit

(Sorry about the RegEx(edit)
)

BTW - your solution puts a "-" after the name but I can fix that with another simple edit



(Sorry about the RegEx(edit)

There are 10 types of people in the world,
Those who understand binary and those who don't.
Those who understand binary and those who don't.
Re: MultiRename a series of files with regedit
Again.... Sorry but your solution inserts the "-" after EVERY second words 

There are 10 types of people in the world,
Those who understand binary and those who don't.
Those who understand binary and those who don't.
Re: MultiRename a series of files with regedit
It's placed after the second word:
louwin wrote: 2024-02-11, 01:13 UTC Name Surname - Word Word Word .... there could many "Word"s in the name
This is a bug. I've been wanting to discuss it for a long time, but I'm still collecting other examples. I added ^ in the original example to avoid this.
Overquoting is evil! 👎
Re: MultiRename a series of files with regedit
You can edit your first post and change the subject (this changes the topic title) and contents of the post. Please do so to make it less confusing

Re: MultiRename a series of files with regex
Perfect! THANKS.... 

There are 10 types of people in the world,
Those who understand binary and those who don't.
Those who understand binary and those who don't.