Table 1


These regular expressions test the form imput in Listing 3.

Field Expression Match
urName ^[a-zA-Z]+ +[a-zA-Z]+$ First and last name
email *[-a-zA-Z0-9_]+@[-a-zA-Z0-9_]+\\.[a-zA-Z][a-zA-Z][a-zA-Z]? Valid email address
tel ^ *\\(? *([0-9][0-9][0-9]) *\\)? *([0-9][0-9][0-9]) *-? *([0-9][0-9][0-9][0-9]) *$ 10-digit phone number
SSN ^ *([0-9][0-9][0-9]) *-? *([0-9][0-9]) *-? *([0-9][0-9][0-9][0-9]) *$ Social security number with optional dashes and spaces