Deprecated: Function eregi() is deprecated

preg_match
function ereg() is deprecated
preg_match(): no ending delimiter '^' found
php eregi to preg_match conversion
call to undefined function eregi php 7
rewrite eregi to preg_match
preg_match return boolean
preg_match(/php manual)