I found this code in PyTorch tutorial,but I can’t search out the exact meaning of it.So I came here to get some help.
s = re.sub(r"([.!?])",r"\1",s)
s = re.sub(r"[^a-zA-Z.!?]+",r" ",s)
Very thx to who would like to answer my question.