I'm trying to get my email validation regex working but the first group isn't allowing me to use the . after the \d for some reason. Am I doing something wrong? I am very new to handling regex but I believe you cannot just do \d.-
as the .
has a different meaning in regex.
const patterns = { email: /^([a-z\d\.-]+)@([a-z\d-]+)\.([a-z]{2,8})(\.[a-z]{2,8})?$/ };