Thread: Regex examples
View Single Post
Old 08-08-2014, 09:20 AM   #373
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
I want to replace by lower case characters some words that have been written, following the older german grammar, beginning with upper case letters, even when they are in the middle of a sentence, such as "Du", "Dich", "Ihr", "Euch".

But put into lower case only, if they are not following period, exclamtion mark, question mark, opening quotation mark.

I have to consider that, after period, exclamation mark, question mark, those words do not immediately follow, but only after a whitespace. And after opening quotation marks they follow immediately, but should only be set into uppercase, if the quotation mark itself does not follow comma or semicolon, such as ' ... he cried, "...'.

It seems that I can only resolve those problems subsequently, but even this causes big problems searching a suiting Regex formula.

Any help is highly appreciated!
Leonatus is offline   Reply With Quote