function apbct_is_regexp in Anti Spam by CleanTalk 7.5
Same name and namespace in other branches
- 7.4 src/Form/CleantalkSettingsForm.php \apbct_is_regexp()
Is this valid regexp
Parameters
$regexp:
Return value
bool
1 call to apbct_is_regexp()
- cleantalk_regexp_validation in src/
Form/ CleantalkSettingsForm.php - Validating the URL exclusion string
File
- src/
Form/ CleantalkSettingsForm.php, line 332 - CleanTalk module admin functions.
Code
function apbct_is_regexp($regexp) {
return @preg_match('/' . $regexp . '/', null) !== false;
}