Alternative for deprecated PHP function: eregi_replace

katrinaatomic

New Member
Do anyone know a good alternative for the deprecated eregi_replace function?I need it for this sniplet:\[code\]$pattern = "([a-z0-9][_a-z0-9.-]+@([0-9a-z][_0-9a-z-]+\.)+[a-z]{2,6})";$replace = "<a href=http://stackoverflow.com/questions/2084881//"mailto:\\1\">\\1</a>";$text = eregi_replace($pattern, $replace, $text);\[/code\]Thanks!
 
Back
Top