Test, validate and match regular expressions
Matches ANSI escape sequences starting with the ESC character (\x1B), covering both short two-character Fe sequences (e.g. ESC followed by @-Z, backslash, - or _) and full CSI sequences like \[[0-?]*[ -/]*[@-~] used for colors, cursor movement, and text styling. Typically used to strip terminal control codes and color formatting from logs, command output, or captured terminal text. The gm flags ensure all occurrences are removed across every line of multiline input.