To ensure I'm ready for my host to upgrade to PHP 5.3, I am trying to update some PHP forms where I used eregi for validating email addresses. I have switched to preg_match and that's working fine right now with 5.2.9. I noticed one note on the PHP 5.3 deprecation page (http://php.net/manual/en/migration53.deprecated.php). It states, "The use of {} to access string offsets is deprecated. Use [] instead."
I use the following for my email validation test:
'/^[[:alnum:]][a-z0-9_\.\-]*@[a-z0-9\.\-]+\.[a-z]{2,4}$/i'
At the end where it tests the length of the TLD, should I change {2,4} to [2,4]?
Thanks,
Jill