I'm trying to remove backslashes and hyphens from text using a regular expression to match for characters to remove.
SPL_CHAR2 = r"[,(.;)@\#?\|!-+_*=~<>/&$]+"
def remove_special_chars(text: str) -> str:
text = re.sub(SPL_CHAR2, ' ', text)
return text
The issue is that these characters are not being removed.