protected function capture($pattern, $search)
    {
        $replace = '(?<$1>' . self::ALLOWED_REGEX . ')';

        return preg_replace($search, $replace, $pattern);
    }
protected function capture($pattern, $search)
    {
        $replace = '(?<$1>' . self::ALLOWED_REGEX . ')';

        return preg_replace($search, $replace, $pattern);
    }
protected function capture ( $ pattern , $ search ) { $ replace = '(?<$1>' . self :: ALLOWED_REGEX . ')' ; return preg_replace ( $ search , $ replace , $ pattern ) ; }
Capture the specified regular expressions.

@param  string $pattern
@param  string $search
@return string
Capture the specified regular expressions .