function domain_registration_wildcard_match in Restrict Domain Registration 8
Same name and namespace in other branches
- 7 domain_registration.module \domain_registration_wildcard_match()
Pattern Match wildcard addresses.
1 call to domain_registration_wildcard_match()
- domain_registration_user_register_validate in ./
domain_registration.module - Custom validation function.
File
- ./
domain_registration.module, line 65 - Domain Registration module file.
Code
function domain_registration_wildcard_match($pattern, $string) {
return preg_match("#^" . strtr(preg_quote($pattern, '#'), [
'\\*' => '.*',
'\\?' => '.',
]) . "\$#i", $string);
}