I want to get only the numbers from a string. For example I have something like this
just=\'Standard Price:20000\'
And I only want it to pr
The clearest way in my opinion is using the re.sub() function:
re.sub()
import re just = 'Standard Price:20000' only_number = re.sub('[^0-9]', '', just) print(only_number) # Result: '20000'