there are more words in a text, some are english, some are latins, now, how to use preg_replace
, broken all the links with #
? make something like:
<a href="#next">flow to the next</a>
=> flow to the next
? (only broken the links with #
in a long text.
Thanks.
not work for this.
$new = preg_replace('/<a(?:.*?)(href="#)(?:.*?)>(.*?)<\/a>/is', '$2', $old);
// this will also broken other links...
demo