fixing depreicated php ereg