protected function Normalize::checkPattern in Bibliography Module 7.2
Check Pattern
Parameters
string $regex: Regular Expression Pattern
array $pattern: Match Pattern
string $str: String to operate on
Return value
MatchObject|false False if no match
1 call to Normalize::checkPattern()
- Normalize::normalize in lib/
msrc-authortool/ src/ Nametools/ Normalize.php - Normalize
File
- lib/
msrc-authortool/ src/ Nametools/ Normalize.php, line 199
Class
- Normalize
- Normalize strings from common formats using REGEX
Namespace
NametoolsCode
protected function checkPattern($regex, $pattern, $str) {
if (preg_match($regex, $str, $matches) > 0) {
return $this
->applyPattern($matches, $pattern);
}
else {
return false;
}
}