Not much difference in what you use but avoiding regex saves an extra import (i5-8250U).
import re
def regex():
dirty = 'Standard Price:20000'
return re.findall("\\d+", dirty)[0]
def regex_grp():
dirty = 'Standard Price:20000'
return re.search(r'\d+', dirty).group()
def isdigit():
dirty = 'Standard Price:20000'
return int(''.join(i for i in dirty if i.isdigit()))
def filter_():
dirty = 'Standard Price:20000'
return int(''.join(filter(str.isdigit, dirty)))
regex() 1.33 μs ± 17.2 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
regex_grp() 1.4 μs ± 17.9 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
isdigit() 1.73 μs ± 5.73 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
filter_() 1.33 μs ± 23.1 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
just[0] == 'S',right?"".join(re.findall('\d+', just))to get all numbers from string