escape characters ignored in strings and regex