【发布时间】:2017-11-03 08:11:08
【问题描述】:
$x = 'A fox was <a href="/xyz/dancingwith">Dancing with</a> light. The night <a href="/xyz/treeare">tree are</a> growing.';
I want to become this
$x = 'A fox was <a href="/xyz/dancing-with">Dancing with</a> light. The night <a href="/xyz/tree-are">tree are</a> growing.';
我要全部替换
<a href="xyz">x y z</a> to <a href="x-y-z">x y z</a>
或
<a href="xaybzc">xA yB zC</a> to <a href="xa-yb-zc">xA yB zC</a>
我想变成这样
请帮帮我。
【问题讨论】:
-
您能告诉我们您尝试过哪些不起作用的方法吗?