regex of string python code example
Example 1: regex in python to obtain only the string in python
import re
print(" ".join(re.findall("[a-zA-Z]","your string")))
Example 2: regex in python
# pip install regex
import re
# simple find all
sample = "Nothing lasts... but nothing is lost"
found = re.findall("thing", sample)
print(found)