How to fix ‘Function eregi() is deprecated’ in PHP 5.3.0? I used to use eregi for validating email address input that matches to the regular expression.