in character class only `\` `-` `]` and `^` at the start have to be escaped