EXAMPLES OF REGULAR EXPRESSIONS A word with optional period: /^[A-Za-z]+\.?$/ Fred with a space: /Fred\s/ A street address: /^\d*\s+[A-Z][a-z]+\s+[A-Z][a-z]+\.?$/ A city and state /^[A-Z][A-Za-z]+,\s[A-Z]{2}&/