Thread: Regex examples
View Single Post
Old 08-10-2014, 10:25 AM   #394
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Leonatus View Post
For weekend reasons, I have the text to be treated not available here to test it, but there might some additional clarification be necessary.

Does your proposal not match any uppercase letter in the respective context?

The point is, that nouns in the german language have always been spelled uppercase (at the beginning of the word, of course), also today, and should remain. Whereas, in the former spelling, most of words representing objects or persons, such as pronouns, have been written uppercase, having to be written lowercase following the actual spelling grammar. So, in English it would be like this:

The black Panther was meant to attack Him immediately, but He jumped quickly aside beyond the Wall.

Thus, the "Panther" and the "Wall" should remain uppercase, but "He" and "Him" should turn lowercase.

I hope the problem I have became clearer.
I agree with mzmm -- matching only selected uppercased letters will quickly get hairy. I only tried for avoiding the ones that are immediately obvious as beginning a sentence. So my solution should match all those words (and replace them).

Given a definite exclusion list, you can definitely do it -- but it won't be very readable.
eschwartz is offline   Reply With Quote