Improve docs and exceptions for regexes