My Question: I found this exercise very challenging. I'm kind stuck on the Date of Birth.
Challenge: Try to come up with the regular expressions to validate the following text strings (don't worry about case insensitivity):
- First name — should be composed of standard English letters and between one and ten characters in length.
- Middle initial — should be composed of standard English letters and be only one character in length.
- Last name — should be composed of standard English letters plus the apostrophe and between two and ten characters in length.
- Date of birth - should fall between 1/1/1900 and 12/31/2099, and should be one of the following date formats: dd/mm/yyyy, dd-mm-yyyy, or dd.mm.yyyy.
I was able to come up for the first three names. But I'm stuck on the Date of Birth.
"^[a-z]{1,10}$", // First name
"^[a-z]$", // Middle initial
"^[a-z']{2,10}$", // Last name
Please help me.