I'm assuming the ordering of the definitions isn't important. If that's the case, I'd have two files, one containing ALL definitions possibly needing replacing, and then have another file with the ones you want. Strip out everything, than append the ones you want:
for x in $ALLDEFS
PreprocessorDefinitions=`echo "$PreprocessorDefinitions" \
| sed "s/$x\;//"`
for x in $NEWDEFS
This way you don't have to worry about 'cutting' things out you might be unable to replace. Not sure if it's what you want though.