src/PcreExtension.php
public function get($value, $pattern, $group = 0)
    {
        if (!isset($value)) {
            return null;
        }
        
        return preg_match($pattern, $value, $matches) && isset($matches[$group]) ? $matches[$group] : null;
    }
public function get($value, $pattern, $group = 0)
    {
        if (!isset($value)) {
            return null;
        }
        
        return preg_match($pattern, $value, $matches) && isset($matches[$group]) ? $matches[$group] : null;
    }
public function get ( $ value , $ pattern , $ group = 0 ) { if ( ! isset ( $ value ) ) { return null ; } return preg_match ( $ pattern , $ value , $ matches ) && isset ( $ matches [ $ group ] ) ? $ matches [ $ group ] : null ; }
Perform a regular expression match and return a matched group.

@param string $value
@param string $pattern
@return string
Perform a regular expression match and return a matched group .