Firstly, I think you can replace the space \s+ or \s if this is really one place (you often find double spaces in the English text).
Secondly, to match an uppercase letter, you must use [AZ] , but AZ will not work (but remember that there may be other uppercase letters than AZ ...).
Also, I think I know why this is not working. The regex engine will try to match \. [AZ] \. [AZ] if he has not surpassed Abs or S The fact is that if it precedes S , it does not precede Abs , so the first pattern matches. If it precedes Abs , it does not precede S , so the second version of the template matches. In any case, one of these patterns will be consistent, since Abs and S are mutually exclusive.
A sample for the first part of your question may be
(?<!Abs)(?<!S)(\. [AZ])
or
(?<!Abs)(?<!S)(\.\s+[AZ])
(with my suggestion)
This is because you need to avoid | , without it, the expression now says that it does not precede Abs, but does not precede S. If both of them are true, pattern matching will continue to scan the string and find your match.
To exclude month names, I came up with this regex:
(?<!Abs)(?<!S)(\.\s+)(?!January|February|March)[AZ]
The same arguments hold true for negative look patterns.
source share