Anti-Advertisement plugin questions
I have seen a new plugin in the new plugins section:
PHP Code:
PHP Code:
|
Re: Anti-Advertisement plugin questions
The regex has 2 parts.
\w+\.[a-z]{2,4}\b \s*\d+\s*\.){3} The first is executed and matches : any characters.any character between A and Z with initial length between 2 and 4 but can be expanded if needed. Spaces are not supported around the point. (test . com won't matches) if the first fails, it tries the second part and matches : any digit. any digit. any digit . Spaces here are supported around the point. |
Re: Anti-Advertisement plugin questions
Wow thanks for this information, and how did you found that what those 2 lines do? Is that something from the regex module? I can only seen the letters a-z, 2,4 but the rest.... :)
|
Re: Anti-Advertisement plugin questions
Well it actually perform a very "rough" check for a domain and an IP address.
The first sub-expression searches for something of the format "<one or more letters>.<minimum 2, maximum 4 characters from A-Z>". That should detect stuff like "Check out example.com". The second sub-expression searches for " <1 to 3 digits> . <1 to 3 digits> . <1 to 3 digits> .". If that matches it's most likely an IP address and even something like "Visit 127 . 0 . 0 . 1" is matched and blocked. |
Re: Anti-Advertisement plugin questions
Thanks for the precision, I'm a noob in regex. :P
|
| All times are GMT -4. The time now is 11:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.