red*_*nua 1 regex notepad++ line match
我想删除具有 3 个或更多点的行。我尝试自己删除它,但它会删除所有带点的行,而我只需要包含 3 个或更多点的行。
例如
p..z.e.4c.e.u.j abc1
aaaaaa 11111
ju.as.h.e.s 125.60.000.
p.iv.p.f.j abcde
r.g.9c 11111112
o.u.n.ggz 12..345.6
ffffffff 22222
1.2.3.45 abcddd
ddddddddddd 33333333
to this result
aaaaaa 11111
r.g.9c 11111112
ffffffff 22222
ddddddddddd 33333333
Run Code Online (Sandbox Code Playgroud)
^.*(?:\..*?){3}.*(?:\R|\Z)LEAVE EMPTY. matches newline解释:
^ # beginning of line
.* # 0 or more any character but newline
(?: # non capture group
\. # a dot
.*? # 0 or more any character but newline, not greedy
){3} # end group, must appear 3 times
.* # 0 or more any character but newline
(?:\R|\Z) # non capture group, any kind of linebreak OR end of file
Run Code Online (Sandbox Code Playgroud)
屏幕截图(之前):
屏幕截图(之后):