Q: Regex using brackets for a single character 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.

A: Here, we can visualize our expressions and check:


We can see that the difference is here, between \.. and [\..].

*

*In the first one, we are saying that we must have a . followed by any char.

*In the second, we want to just pass one of . or ., which is equal to [.].

Demo for second expression
RegEx Circuit
jex.im visualizes regular expressions:

A: I think you may have the two patterns reversed.  The second one does not match and the first one matches:  
^(Mr|Mrs|Ms|Dr|Er)\..[A-Za-z]+$
Demo 1 
^(Mr|Mrs|Ms|Dr|Er)[\..][A-Za-z]+$
Demo 2
The second one uses character class [\..] which removes special meaning of any regex tokens (e.g., . within [] matches literal period and not its special meaning (any character).  The first pattern matches a literal period followed by any single character other than newline.  For details on this, check out the "Explanation" on the right side in the demo links above.  
UPDATE: your pattern also would match Ms.underscore (no space between title and name). So consider the following pattern, which I think works better for what you're looking for:  
^(Mr|Mrs|Ms|Dr|Er)\.[ _][A-Za-z]+$
Demo 3
