P
P
Polim2015-12-11 13:04:17
Regular Expressions
Polim, 2015-12-11 13:04:17

How to find all occurrences of numbers?

It is required to compose a regular number to search for a number consisting of a certain number of digits, for example, 5 digits, no more no less
Example_1: "id = 111; //comment" result = no match
Example_2: "var a = 11122; //comment" result = "11122"
Example_3: "reg = 11122555; //comment" result = no match
Tried ([\d]{19}) but then example 3 also falls under this regsp

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Fedoryan, 2015-12-11
@Polim

regexr.com/3ccva

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question