Test, validate and match regular expressions
Matches newlines (\n), carriage returns (\r), tabs (\t), null characters (\0), backspace characters ([\b]), and leading/trailing whitespace on each line (via the multiline flag). Typically used with String.replace() to sanitize user input by stripping control characters and auto-trimming spaces from form fields or text data. The global flag ensures every occurrence is removed throughout the string.