Fix DOMAIN and EMAIL patterns.

Closes #1107