by Luuk » Fri Apr 29, 2022 11:42 pm
This can also depend if you need to rename some files like in the description, or if its only " - " that should ever get replaced??
The way this conducts can be hard to describe, so Im just giving some "Now-Names" ====> "New-Names" to present the changes.
To skip 8-characters, then replace " - " with space, the RegEx(1) needs a checkmark in "v2" with a "Match" and "Replace" like...
(\G(?!^)|^.{8}).*?\K +- +/g
\x20
S01-E01-E03 name1-name2.txt ================> (no change, because no " - ")
S01-E01-E03 name1-name2-name3-name4.txt ===> (no change, because no " - ")
S01-E01-E03 name1 - name2 - name3.txt =======> S01-E01-E03 name01 name02 name03.txt
To skip 8-characters, then replace both "-" and " - " with space, the "Match" and "Replace" can be more like...
(\G(?!^)|^.{8}).*?\K *- */g
\x20
S01-E01-E03 name1-name2.txt ================> S01-E01-E03 name1 name2.txt
S01-E01-E03 name1-name2-name3-name4.txt ===> S01-E01-E03 name1 name2 name3 name4.txt
S01-E01-E03 name1 - name2 - name3.txt =======> S01-E01-E03 name1 name2 name3.txt
Its unfortunate, but the forum software will not grant saying any lines with only having a space.
So Im just using '\x20' to say 'space', but you can really just type a space for the replacements.