function domain_registration_wildcard_match in Restrict Domain Registration 7
Same name and namespace in other branches
- 8 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 143 - Domain Registration module file.
Code
function domain_registration_wildcard_match($pattern, $string) {
return preg_match("#^" . strtr(preg_quote($pattern, '#'), array(
'\\*' => '.*',
'\\?' => '.',
)) . "\$#i", $string);
}