-2
还有一个文字中有更多的单词,有些是英文,有些是latins,现在,如何使用preg_replace
,打破所有链接#
?使类似:php preg_replace所有链接#
<a href="#next">flow to the next</a>
=>flow to the next
? (仅在长文本打破了链接与#
。
感谢。
不适合这项工作。
$new = preg_replace('/<a(?:.*?)(href="#)(?:.*?)>(.*?)<\/a>/is', '$2', $old);
// this will also broken other links...