by Stefan » Mon Feb 28, 2011 4:46 pm
Welcome,
FROM:
aaaaa bbbbb feat. cccccc dddddd - eeeeeee.mp3
TO:
aaaaa bbbbb - eeeeeee.mp3
DO:
RegEx(1)
Match: (.+) feat\. .+ (- .+)
Repla: \1\2
Explanation:
"(.+)" =====> match one-or-more of any sign ===> "aaaaa bbbbb" and store this in group (1)
" feat" ==> match an space, followed by literal "feat" ===> " feat"
"\." ====> followed by an dot ==> "."
" .+ " ===> followed by one space and one-or-more of any sign and an space ==> " cccccc dddddd "
"(- .+)" => match an dash followed by an space and one-or-more of any sign ===> "- eeeeeee" and store in group (2)
Note: " feat. cccccc dddddd " is not stored into an group because we want to get rid of this part anyway.
Then replace with was is matched and stored in group 1 and group 2
\1\2
untested but should work
Note that based on your example i just use " feat" and "- " as anchor point to catch the position to split the parts.
If there are more then one of each of this two anchors in the string my regex will fail.
If not, then even this simpler regex may work too:
Match: (.+) feat.+ (- .+)
Repla: \1\2