LearnPy Hub
← Regular Expressions problems
Easy

The First Number

Read a line and print the first whole number in it using re.search(r'\d+', text).group(), or none if there is no number.

Input

One line.

Output

One line.

Sample 1

Input
I have 3 cats and 12 fish
Output
3

Sample 2

Input
no numbers
Output
none
solution.py
Output appears here
The First Number · Python practice problem · LearnPy Hub