Answer the question
In order to leave comments, you need to log in
Why does the regular expression "not see" a number with one sign?
There is a text:
ago 9 minutes, 37 seconds 666,141 views
ago 9 minutes, 37 seconds 66,141 views
ago 1 hour, 10 minutes 717 views
ago 46 seconds 405 views
ago 58 seconds 8 views
There is a regular season:
https://regex101.com/r/ jmYuCb/1
Why does the regular expression not see the last line in which one character is in the number? ... Here it is actually: 8 views
Answer the question
In order to leave comments, you need to log in
optionality must be done through a question mark
(?<=ago).+?(?=\s+\d+(?:[,|\d+]+)?\s+views)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question