Test, validate and match regular expressions
This regex matches an entire line, capturing the non-whitespace content in the middle. With the `gm` flags, it is commonly used to trim leading and trailing whitespace from every line in a multiline string. The trimmed text is stored in capturing group 1.