user3108698
user3108698

Reputation: 719

Reg Expression Names with two caps without spaces for IQAndreas PHP Spam Filter

I want to add an reg expression entry to one of the blacklist that will filter any person's names that has two capitals but without spaces because I see a lot of spammers with names like MarcelBoilt, RobertGef, ZichardMed, IngaOxina.

How should i write the Reg Expression to block these names? These one word names must have at least 3 letters.

Blacklist Requirement: - Any regular expression syntax can be used here (without the delimiters). - Regular expressions are always case insensitive. - No regular expression may span more than one line. - Anything after the '#' character until the end of a line is ignored, so use this for comments. - If you only want to write out keywords, remember to escape special characters that have meaning in regex.

Reference: https://github.com/IQAndreas/php-spam-filter

Upvotes: 0

Views: 105

Answers (1)

Russ Brown
Russ Brown

Reputation: 171

This should do it for you.

^[A-Z][a-z]+[A-Z][a-z]+

Upvotes: 0

Related Questions