I need to search for all strings like this "264676343" in sublime text editor, 9 numbers between "". I try to use this "0-9" but not work... please help me.
Asked
Active
Viewed 75 times
-2
-
Possible duplicate of http://stackoverflow.com/questions/3968049/regex-allow-a-string-to-only-contain-numbers-0-9-and-limit-length-to-45 – MattDMo Sep 18 '16 at 12:04
1 Answers
2
the 0-9
searches for digits. That is good. But you need to find a sequence of digits, so:
[0-9]+
take a look: https://regex101.com/r/yJ2rA8/1
and if you want to have EXACTLY 9 digits, then this should do the trick:
[0-9]{9}
take a look: https://regex101.com/r/aC7oF9/2
As per MattDMo comment, you may also use a shorthand for digits \d
instead of 0-9
:
\d{9}
\d+

Unamata Sanatarai
- 6,475
- 3
- 29
- 51
-
1
-
You might wan to add that OP is looking for digits in double quotes (see the question), so finally: `"\d+"`. – Jan Sep 18 '16 at 13:51