This is a Sentence which contains
Some capitalization errors.
So far I have this: (?<![.!?]\s)(?<!^)(?<!\sI\s)(?!I['’][a-z])(?!\b(?:Dr|Mr|Mrs)\.[\s\r\n])\b(?!I\b)[A-Z]\w*
It will find "Sentence" in the above. It avoids hitting on I and I' contractions, and Dr. / Mr. / Mrs.
What I can't get it to do is find "Some" in the above.
I feel maybe a second expression might be better for document scanning, as the first expression is quite long and probably not optimized.
I need the expression to be PCRE compliant that avoids non fixed width errors and such.
Just can't solve this on my own unfortunately. As expected AI is no help here... the best models struggle with regular expressions unless they are more simple.
Tried many different RegEx's to match the word "Some" in the above. It should NOT match a preceding line that ends with a period, question mark, or exclamation point. It should also NOT match on I and I' contractions, or on Dr. / Mr. / Mrs.