Answers for "how to Write the regular expression that will match all non-digit characters of a string."

0

how to Write the regular expression that will match all non-digit characters of a string.

import re
foo = '69he420l356lo420World69420'
match = re.findall(r'\D', foo)
print (match)
#should return, ['h', 'e', 'l', 'l', 'o', 'W', 'o', 'r', 'l', 'd']
Posted by: Guest on July-06-2020

Code answers related to "how to Write the regular expression that will match all non-digit characters of a string."

Python Answers by Framework

Browse Popular Code Answers by Language