Build, test, and debug regular expressions
This PCRE2 pattern uses an alternation to match an exclamation mark followed by either a newline character (!\n) or one or more literal spaces (! +). The global flag finds every occurrence in the input, while the multiline flag supports line-by-line processing context. It is useful for text cleanup tasks such as detecting exclamation marks at line ends, trimming extra spaces after exclamation points, or normalizing emphatic punctuation in user input or logs.