Answers for "regex to exclude special characters"

C#
2

regex replace all special characters

Regex.Replace(your String, @"[^0-9a-zA-Z]+", "")
Posted by: Guest on March-25-2020
0

regex to escape special characters

function escapeRegExp(text) {
  return text.replace(/[-[]{}()*+?.,\^$|#s]/g, '\$&');
}
Posted by: Guest on October-14-2021

Code answers related to "regex to exclude special characters"

C# Answers by Framework

Browse Popular Code Answers by Language