Use preg_match() instead of (deprecated) eregi(). Fixes #3.