Reverting change to regex greediness.

This commit is contained in:
jperras 2009-03-18 02:11:03 -04:00
parent 6068549418
commit a9952e90c1

View file

@ -288,7 +288,7 @@ class Inflector extends Object {
$_this->singular['cacheIrregular'] = '(?:' . join( '|', array_keys($irregular)) . ')';
}
if (preg_match('/(.+?)\\b(' . $_this->singular['cacheIrregular'] . ')$/i', $word, $regs)) {
if (preg_match('/(.*)\\b(' . $_this->singular['cacheIrregular'] . ')$/i', $word, $regs)) {
$_this->singularized[$word] = $regs[1] . substr($word, 0, 1) . substr($irregular[strtolower($regs[2])], 1);
return $_this->singularized[$word];
}