9 times out of ten, @PenguinCEO's answer will work as good as any--provided only english-standard ascii letters are being used. But if there's any special accented uppercase characters that would fit the bill (or special unicode space characters after the period) it won't work.
Some flavors of regex offer "character class subtraction" but the PCRE regex that Sigil uses does not. The regex module included with its bundled Python for plugins, however,
does. I won't get into the syntax needed to accomplish character class subtraction for the various regex engines, but I will mention that negative lookaheads can be used to achieve the same thing in all flavors of regex.
So in this specific case, if one wanted to match any unicode uppercase letter (
\p{Lu}) except the letter D (
(?!D)) following a period (
\.) and any unicode space character (
\p{Zs}). You could use something like the following:
Code:
\.\p{Zs}(?!D)\p{Lu}
It would work for all the following cases (even if the spaces in question were special non-breaking space characters or narrow-non-breaking space characters)
Too much, I know, but I couldn't help myself.
Using @PenguinCEO's much simpler solution, the negative lookahead workaround for character class subtraction would look something like like: