Here is my original code listed below.
if(ereg($pattern,strtolower($this->get_domain())) && !ereg("^-|-$",strtolower($this->get_domain())) && !preg_match("/--/",strtolower($this->get_domain()))){
This is the error
Deprecated: Function ereg() is deprecated in
Then I replaced the ereg with preg_match
below. I receive this error
if(preg_match($pattern,strtolower($this->get_domain())) && !preg_match("^-|-$",strtolower($this->get_domain())) && !preg_match("/--/",strtolower($this->get_domain()))){
Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in
I tried to to put /
before the ^
and after the $
but still no luck. May I get some assistance from someone who might know how to fix this error.