Replaced eregi with preg_match equivalent (issue #4)

Replaced eregi with preg_match equivalent (issue #4)