$substring = preg_???('/\w+@/','info@gmail.com');
$substring === 'gmail.com'; //TRUE
$substring = preg_???('/\w+.\w+$/','info@gmail.com');
$substring === 'gmail.com'; //TRUE
$matches = [];
$result = preg_match('/\w+.\w+$/','info@gmail.com', $matches);
var_dump($result);
var_dump($matches);