我正在查看我用 ed 打开并显示为的文件的一行.p
:
First sentence. Another. One. Text continues
现在我想First sentence.
用replacement.
但是替换字符串,命令
.s/.*\./replacement./
以贪婪的方式运行,也就是说,它替换First sentence. Another. One.
为replacement
,而不是First sentence.
如所希望的那样。
如何在 ed 中进行非贪婪替换?