【发布时间】:2014-05-03 23:20:42
【问题描述】:
我想删除所有行,直到某个终止字符串。所以是这样的:
These
lines
|| that can contain numbers 123 or characters like |*{
will be removed
But the following lines
will
remain.
我要获取:
But the following lines
will
remain.
我尝试搜索正则表达式 /removed$/ 并替换为空字符串,但它显示的是 0 matches。
我该怎么做?
感谢您的帮助!
【问题讨论】:
-
是一个'.'一个特殊的字符?尝试用'\'
-
不要介意点。我删除了它。对此感到抱歉。我的终止字符串实际上是一个带有字母的字符串。