Replace deprecated function ereg by preg_match
Merge pull request #1 from neilime/master

 Replace deprecated function ereg by preg_match