Replacing any two (or more) uppercase letters followed by lowercase with title case

I often type things like THis or THat: essentially holding down the shift key too long when capitalizing. The text editor I use, Sublime, doesn't have the option to correct in place (as with TextEdit or MS Word) and I'm trying to build in this feature.

I experimented with the "title case -> selected case" example used in this thread, hoping to use a typed regex as a trigger: Converting Case - #2 by ComplexPoint. But that macro requires that the word being replaced is selected and I was hoping for a way where just the last word typed is automatically tested for the regex and the copy to/ from clipboard is invoked with the desired case.

So the question: is there a way to tell KM to select the last word / string typed? Or is there another way to do what I'm after? Relatedly, if there is a lexicon in KM that can test against words you type as you go, that would be the more complete solution and would correct all typos in-place.

Toggler Macro includes a macro that does that (Double Caps). It includes a beginner list of exceptions you can add to as well. And running it with Toggler will let you easily disable it on those occasions it's more trouble than it's worth.

I use three macros to lowercase, uppercase, or capitalize the word or word fragment immediately to the left of the cursor. They’re explained here.

Keyboard maestro can definitely do this, but I like using Typinator. It does this, as well as doing many other expansions. It also has a list of common double letter exceptions so that things like CDs or BEng (Bachelor of Engineering) don't get converted incorrectly.

Thanks all for those suggestions -- appreciated. I went with "Double Caps Fix" that @mrpasini posted and that's working well.

Had a look at Typinator and the in-place typo-fixing feature looks great. Anyone know if a macro has been been written in KM that would do something similiar? I have been using individual text expansion macros to fix typos but that's getting tedious.