First, match every line % and do a search and replace. Take the first non-uppercase letter of the match \U and put it into a group (\U). Then do a greedy match every character after the first that's not a period [^\.]* and put it into another group ([^\.]*\.) that ends in a period.

After the match is complete, uppercase \u the first match \1 and lowercase \L all the characters in the second match \2. Finally, do this replacement as many times as you need /g.

EDIT: Added \v to clean up all those nasty backslashes. Thank you @shawn.

EDIT 2: Moved \. into group \2, shaves off another two characters ;)

EDIT 3: Changed the first letter from \w to \U. No need to match characters that are already uppercase!