now its actually valid json. I had to escape a bunch of characters in the regular expressions