0

I’m new on Notepad++ and I want to know how can I lookup for a numbers in between two numbers:

Like I want to search in a text file full of numbers and words, and I only want to find the numbers between 250-500; so, all the numbers from 250-500 will be in search, in others words, no numbers should be search but only the number between 250-500!

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
RAB_ROAD
  • 27
  • 2

1 Answers1

0
  • Ctrl+F
  • Find what: \b(?:2[5-9]\d|[34]\d\d|500)\b
  • CHECK Wrap around
  • CHECK Regular expression
  • Find All in Current Document

Explanation:

\b              # word boundary
(?:             # non capture group
    2[5-9]\d        # matches 250 upto 299
  |               # OR
    [34]\d\d        # 300 upto 499
  |               # OR
    500             # 500
)               # end group
\b              # word boundary

Screenshotenter image description here:

Toto
  • 89,455
  • 62
  • 89
  • 125
  • Also, one can use the snippet given in [this answer](https://stackoverflow.com/a/67502416/11613622) to quickly generate the regex for any range. – brc-dd Dec 31 '21 at 10:08