fix invalid character class in regular expression
add compat tests for backticks (relates to #718)