I am trying to use this command:
sed -i \'s#\\{test1\\}#test2#\' /example/myfile.txt
To replace instances of {test1} with
{test1}
sed -i 's#{test1}#test2#' /example/myfile.txt
You don't need escape {}
{}