记事本++在范围内搜索

问题描述 投票:0回答:1

我有一个巨大的文件,其中包含带小数的数字,如下所示

31.3043 31.3043 31.3043 31.3043 31.3043 31.3043 31.3043
200 200 200 200 200 200 200
121.739 121.739 121.739 121.739 121.739 121.739 121.739
10.4348 10.4348 10.4348 10.4348 10.4348 10.4348 10.4348
5.2174 5.2174 5.2174 5.2174 5.2174 5.2174 5.2174 5.2174 

我只想搜索的是10以上的数字

31.3043 31.3043 31.3043 31.3043 31.3043 31.3043 31.3043
200 200 200 200 200 200 200
121.739 121.739 121.739 121.739 121.739 121.739 121.739
10.4348 10.4348 10.4348 10.4348 10.4348 10.4348 10.4348

不包括数字

5.2174 5.2174 5.2174 5.2174 5.2174 5.2174 5.2174 5.2174 
search notepad++
1个回答
1
投票

这样做的工作:

  • 按Ctrl + F
  • 找到什么:(?<![.\d])\d{2,}(?:\.\d+)?
  • 检查包裹
  • 检查正则表达式
  • 搜索

说明:

(?<![.\d])  : negative lookbehind, make sure we have not digit or dot before current position
\d{2,}      : 2 or more digits
(?:\.\d+)?  : optional non capture group, for decimal part
© www.soinside.com 2019 - 2024. All rights reserved.