+ 2
Regex, character classes
I want to write a simple regular expression in Python that extracts a number from HTML. For example 110 The HTML sample is as follows: number is <b>123</b>
1 ответ
+ 6
the class character for digit (0-9) is r"\d"...
as you want consecutives digits, you must append 'plus' sign:
num = r"\d+"