2017-04-06 44 views
0

我怎么可以转换/更新以下的正则表达式的功能是有效的PHP 7:如何转换特殊ereg_replace功能

$rawsub=ereg_replace("</*b>", "", $subject); 

$qauthor=ereg_replace("<b>|</b>", "", $author); 

$body=eregi_replace("<(mailto:)([^ >\n\t]+)>", "{phopen}a href=\"\\1\\2\"{phclose}\\2{phopen}/a{phclose}", $body); 

$body=eregi_replace("<([http|news|ftp]+://[^ >\n\t]+)>", "{phopen}a href=\"\\1\"{phclose}\\1{phopen}/a{phclose}", $body); 

$body=eregi_replace("<(/*($ForumAllowHTML) *[^>]*)>", "{phopen}\\1{phclose}", $body); 
+0

这些正则表达式看起来他们缺乏定界符(即'/')?这些抛出错误?如果是这样,请[编辑]你的问题,包括错误。 –

回答