Build, test, and debug regular expressions
All-in-one whitespace sanitizer that trims leading whitespace at the start of each line and trailing whitespace at the end (thanks to multiline mode), while also collapsing any internal runs of multiple whitespace characters down to a single space (via the capture group used as $1 in replacement). Ideal for cleaning up messy text, normalizing indentation, and sanitizing user input or log output in a single pass.