HOTSPOT
You are validating user input by using JavaScript and regular expressions.
A group of pre-defined regular expressions validate two input fields:An email address in a function named validateEmail. The email address must use two-part domains with
two to four characters in the second part of the domain name.
A nine-digit number that allows optional hyphens after the third and fifth character in a function named
validateID (for example, 555555555 or 555-55-5555)
You need to use the correct expression to validate the input.
Which expression should you insert into each function? To answer, select the appropriate options from the
drop-down lists in the answer area.
Hot Area:

Right.
6
0
But what about punctuation in the email, like .com? That is not covered, or?
And why is there a \ before the last character group? \[a-zA-Z]{2,4}?
0
0