icinga2-checks/checker/string.py

3 lines
105 B
Python

def strip_non_numbers(input_string):
return ''.join(char for char in input_string if char.isdigit())