Remove All Non-Numeric Characters from String using Python April 23, 2021 Python 0 Comments 351 Views re.sub function import re text = 'Number: +(123) 726-632' result = re.sub(r'\D', '', text) print(result)
Leave a Comment
Cancel reply