Handle escaped slashes in regular expressions

Escaped slashes in regular expressions were not being recognised. `/[A-Z]\/[A-Z]/` should match `A/B`.