Let's write a regex to filter those insufferable faggots Who Capitalize Every Word In Their Posts.
So far I've got \b[A-Z]\w\+\b to identify words beginning with a capital but it misses single-character words, and the main issue is getting it to match every word.
Did you really have this hard of a time with this?
Liam Reed
That's just gonna filter every post with even a single capitalized word.
Lucas Nguyen
Is this even possible?
Isaac Lewis
^([A-Z]\w*\s*[.,:;!?]?\s*)+$ This allows you to put many spaces after a punctuation.
Jacob Gray
I honestly haven't seen anyone on Jow Forums do this, but good luck
Caleb Torres
Is \+ a typo? Pretty sure it just matches the literal +.
I'm a dumbass but I'd use nested repeating groups to capture words and punctuated sentences, like this: (?:(?:\b[A-Z]\w*\s*)+[\.!?]\s*)+
Henry Myers
How Can Mirrors Be Real If Our Eyes Aren't Real
Andrew Collins
Neat, your solution is basically the same as mine at
Caleb Lopez
I like yours a bit more.
Both fail though with the addition of non \w characters like the apostrophe here
Asher Richardson
whom are you trying to filter?
Andrew Wilson
jayden here (guy who made the Eyes Aren't Real post)
This fixes it but I'm shit at regex and might have side effects
^([A-Z](\w|\')*\s*[.,:;!?]?\s*)+$
I can think of other things that won't trigger it, like
How Can Mirrors Be Real - If Our Eyes Aren't Real
So you might have a bit more work to do
Aaron Wood
No one Gives a Fuck About your Name, Jayden
Aaron Wood
Sorry Retard, it just so happens that in my native Language you capitalize all Nouns, so it sometimes is a hard Habit to break although now I am doing this intentionally.
fucking faggot, perhaps if you knew shit outside of your pathetic arch operating system fetish you would get a girlfriend
Blake Williams
Might be best to replace \w with something like [^\s.,:;!?].
These sons of a bitches aren't capitalizing every word, but can be caught if we set a tolerance using something like (thepattern){3,}[.?!][\code] which checks for at least three occurrences of a capitalized word within a sentence.
Jeremiah Robinson
What's your native language?
Angel Thompson
Perhaps you should spend more time mastering the English language. After all, it is the only important language in the world, the only one where it is reasonable expected any professional will speak, and what will replace all other languages in at most 200 years.
Julian Morales
German.
Well, it's not like it changes the Meaning or makes what I write incomprehensible. It is just a Habit I fall back in occasionally, especially when I write rather fast.
>and what will replace all other languages in at most 200 years. Reason enough to butcher it a little.
Joseph Roberts
>which checks for at least three occurrences of a capitalized word within a sentence. But that is a bad idea. "Jon thinks that England and Wales are a part of Britain." See, there is nothing grammatically wrong here.
Levi James
>German. >Well, it's not like it changes the Meaning or makes what I write incomprehensible. It is just a Habit I fall back in occasionally, ... Same.