Answer the question
In order to leave comments, you need to log in
How to exclude number followed by text?
There is a text in which I am trying to find numbers.
There are no problems with this \d+
:
But, if there is text after the number, we discard these numbers: \d+(?!\D)
.
Now these numbers are discarded, but at the same time, when finding other numbers, an error occurs (we get an incomplete number).
Example
Tell me where I make a mistake?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question