Test, validate and match regular expressions
This regular expression matches any single character that is typically considered invalid or illegal in file and directory names across different operating systems, including Windows and Unix. It looks for special characters such as hash signs, percent signs, curly quotes, asterisks, pipes, colons, angle brackets, question marks, and slashes. It is highly useful for input validation, sanitizing user inputs before saving files, or sanitizing file paths to prevent filesystem errors.