Build, test, and debug regular expressions
This regular expression matches one or more consecutive special characters, punctuation marks, or formatting symbols. It is specifically designed to sanitize user input by identifying unwanted symbols, such as those entered into a search query field. Using the global flag, it finds all sequences of these restricted characters so they can be easily stripped out or replaced.