您好我会在以标签开头的文件行中找到一些建议。 我有如下文件: 文本1 - > text2的
我会有像text1 text2
这样的行谢谢
安东尼奥
答案 0 :(得分:3)
如果您希望匹配以制表符开头的行,请使用此^\t+.*$
或^\t+.*\n
如果你想从开始删除标签,请使用此正则表达式^\t+
并替换为null string
如果您想要删除文本中的标签,请使用\t+
(这也会匹配单词之间的标签)并替换为null string
或space
。您也可以使用单个标签替换\t
如果你愿意
input: "`\t`text1`\t`text2`"
output if use regex `^t+` and replace with null => "text1`\t`text2"
output if use regex `t+` and replace with null => "text1text2"
output if use regex `t+` and replace with space=> " text1 text2"
答案 1 :(得分:0)
怎么样:
搜索:^\t+.*$
这将匹配以任意数量的制表开头的行。