I am trying to build a generic formatter for my MP3 file names (very important) with bash, and a large part of this is being able to move text around using regex variables. For example I am trying to remove the parentheses () from around the ft. Kevin Parker.
oldfilename="Mark Ronson - 02 Summer Breaking (ft. Kevin Parker).mp3"
newfilename=$(echo $oldfilename | sed -E "s/ft.\(*\)/ft.\1/g")
This causes the error:
sed: 1: "s/ft.\(*\)/gt.\1/g": \1 not defined in the RE
I have tried escaping and not escaping the (), and adding and removing the -E switch as recommended by .bash_profile sed: \1 not defined in the RE. Help?!