All these questions are similar, having (my guess) a similar answer:
The ereg functions, which are POSIX, have been DEPRECATED (as of PHP 5.3.0). So, why do we need to use POSIX, if the PHP community prefers PCRE regular expressions?
The mb_ereg functions, which are also POSIX, are only for stay with
mb_
prefix family of multi-byte functions?I have been used preg functions with UTF8-strings, and the
/u
option to UTF8-regex (!). Why not use only PCRE?There are an explicit (official) PHP documentation about when to use
preg
and when to usemb_ereg
?
Related questions (they do not offer a direct answer):
Are the PHP preg_functions multibyte safe? @mercator comment say that
mb_ereg
functions "are the multi-byte version of the POSIX ereg functions, though, which aren't exactly the same as the PCRE preg functions". So, why use it? Only because some people like POSIX and dislike PCRE?preg_match and UTF-8 in PHP is about 2006's PHP bug.