protected function getCompoundedRegex()
{
if ($this->regex === null) {
for ($i = 0, $count = count($this->patterns); $i < $count; $i++) {
$this->patterns[$i] = '(' . str_replace(array('/', '(', ')'), array('\\/', '\\(', '\\)'), $this->patterns[$i]) . ')';
}
$this->regex = '/' . implode('|', $this->patterns) . '/' . $this->getPerlMatchingFlags();
}
return $this->regex;
}