only replace curly braces preceeded by a space