The biggest change in the syntax is the addition of delimiters.
ereg('^hello', $str);
preg_match('/^hello/', $str);
Delimiters can be pretty much anything that is not alpha-numeric, a backslash or a whitespace character. The most used are generally ~
, /
and #
.