public function Normalize::normalize in Bibliography Module 7.2
Normalize
Parameters
string $str: The string to normalize
Return value
MatchObject|false A match object, or false if no match found
File
- lib/
msrc-authortool/ src/ Nametools/ Normalize.php, line 168
Class
- Normalize
- Normalize strings from common formats using REGEX
Namespace
NametoolsCode
public function normalize($str) {
//Run through the REGEXes in order. If match found, match it
foreach ($this->patterns as $regex => $pattern) {
if ($res = $this
->checkPattern($regex, $pattern, $str)) {
return $res;
}
}
//If match not found return false
return false;
}