I have a string like
↵my name is Pankaj↵
I want to remove the ↵ character from the string.
\"↵select * from e
With something like
s.replace(/[^a-zA-Z0-9_ ]/g, "")
you can for example keep only alphabetic (a-zA-Z), numeric (0-9) underscores and spaces.
Some characters require to be specified with a backslash in front of them (for example ], -, / and the backslash itself).
You are however going to run into problems when your start deploying to an international audience, where "strange characters" are indeed the norm.