如何在记事本++中找到一个超过7个数字的行?
1 1 30 0.111000 -5.13248 -10.7541 12.5497
我知道这些数字之间有一个零或其他东西 我试过标记线,但我找不到合适的命令。
答案 0 :(得分:0)
^\h*(?:[+-]?\d+(?:\.\d+)?)(?:\h+[+-]?\d+(?:\.\d+)?){7,}\h*$
<强>解释强>
^ : begining of line
\h* : 0 or more horizontal spaces
(?: : start non capture group
[+-]? : optional + or -
\d+ : 1 or more digit
(?: : start non capture group
\.\d+ : a dot followed by 1 or more digit
)? : the group is optional (ie. no decimals)
) : end group
(?: : start non capture group
\h+ : 1 or more horizontal spaces
[+-]? : optional + or -
\d+ : 1 or more digit
(?: : start non capture group
\.\d+ : start non capture group
)? : the group is optional (ie. no decimals)
){7,} : the group must be present 7 or more times
\h* : 0 or more horizontal spaces
$ : end of line