It took me a while to discover that you must escape characters like parentheses (), square brackets [] and ^ (and maybe more) if you want to match these as a literal. Otherwise you may get some erratic outcome.
In summary, using a match anywhere in the string as an example:
<?php
$needle = "[";
$haystack = "some_array[]";
$test= mb_ereg_match(".*".$needle, $haystack); // returns false and a php warning
$test= mb_ereg_match('.*'.preg_quote($needle), $haystack); // returns true
?>