import re
regex = re.compile(r"\/[A-Z.,]*", flags=re.IGNORECASE)
test_str = "The/DT suburb/NN of/IN Saffron/NNP Park/NNP lay/VBD on/IN the/DT sunset/JJ side/NN of/IN London/NNP ,/, as/IN red/JJ and/CC ragged/VBD as/IN a/DT cloud/NN of/IN sunset/NN"
subst = ""
result = regex.sub(subst, test_str)
if result:
print(result)
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html