Grep with BBEdit
Grep with BBEdit
我有一个大文本文件,其中包含许多以下模式;
because of,this
or that,has
or,not
当然要改以下
because of, this
or that, has
or, not
为了让自己清楚:我想在每个 ,
之后插入一个 space
我如何使用 BBEdit Find/Replace/Grep 做到这一点?
查找工作正常
[\,](\w)
但是我想不出替换的对应部分。
我把事情复杂化了。
类似 Letter,Letter
的模式也可以用 ,\b
找到。
\b 位于单词的开头或结尾。 \b 在正则表达式中表示 "word boundary".
然后用 ,_
完成替换
Nota Bene:_
是 ,
之后的 "Space"
您可以将所有逗号替换为逗号-space,然后将所有 space-space 替换为 space
Find: (\,)(\w)
Replace:
注意:您需要在 \1 和 \2 之间按空格键。在我的电脑上使用 BBedit v13
我有一个大文本文件,其中包含许多以下模式;
because of,this
or that,has
or,not
当然要改以下
because of, this
or that, has
or, not
为了让自己清楚:我想在每个 ,
space
我如何使用 BBEdit Find/Replace/Grep 做到这一点?
查找工作正常
[\,](\w)
但是我想不出替换的对应部分。
我把事情复杂化了。
类似 Letter,Letter
的模式也可以用 ,\b
找到。
\b 位于单词的开头或结尾。 \b 在正则表达式中表示 "word boundary".
然后用 ,_
Nota Bene:_
是 ,
您可以将所有逗号替换为逗号-space,然后将所有 space-space 替换为 space
Find: (\,)(\w)
Replace:
注意:您需要在 \1 和 \2 之间按空格键。在我的电脑上使用 BBedit v13