You are here

function apbct_is_regexp in Anti Spam by CleanTalk 7.5

Same name and namespace in other branches
  1. 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;
}