大家好。
我正在寻找一种在shell脚本中执行与PHP的preg_replace()相同操作的方法(搜索匹配正则表达式的文本并替换它)。
因此,请考虑以下文件。
<a href="http://example.com/">Website #1</a>
<a href="http://example.net/">Website #2</a>
<a href="http://example.org/">Website #3</a>
我想要得到这个:
http://example.com/
http://example.net/
http://example.org/
有没有一种方法可以做到这一点?谢谢。