【发布时间】:2019-05-09 18:11:01
【问题描述】:
我的文件内容如下
<categories>Category 1, Category 2, Category 3</categories>
类别的数量各不相同。
我想使用 grep 模式运行搜索和替换命令,该命令将产生以下结果:
<categories>
<category>Category 1</category>
<category>Category 2</category>
<category>Category 3</category>
</categories>
【问题讨论】:
标签: regex replace grep textwrangler