【发布时间】:2017-10-09 22:37:56
【问题描述】:
我使用负前瞻来查找不以注释开头的每一行(仅“//”),但在“//”符号之前可以有任意数量的制表符。
这是我的正则表达式(我使用的是记事本++):
^\t*(?!//).*
示例:在此示例文件中:
LineOfCode ...
// Other Comment
// Comments can contain every time of symbol, including "//", ".", etc.
// /**
// Another comment ...
// */
Line Of Code ...
// .,.,-
只有第一行和第七行应该匹配,但使用我的正则表达式,它们都匹配。
【问题讨论】:
标签: regex notepad++ negative-lookahead