You might want to triple quote it so you can avoid all the double escaping. That and the regex match I think would clean it up a bit.