Fix regular expressions and string literals

Escape curly braces in regular expressions and use level one string literals.