I was solving this regex problem
Given a test string, s , write a RegEx that matches s under the following conditions:
s must start with Mr., Mrs., Ms., Dr. or Er.
The rest of the string must contain only one or more English alphabetic letters (upper and lowercase).
I used this pattern
Regex_Pattern = r'^(Mr|Mrs|Ms|Dr|Er)\..[A-Za-z]+$'
but it failed this test case "Ms._underscore", then I tried using this pattern
Regex_Pattern = r'^(Mr|Mrs|Ms|Dr|Er)[\..][A-Za-z]+$'
and it passed all test cases, I cannot figure out the difference.