Test, validate and match regular expressions
Matches each line with leading and trailing whitespace stripped, capturing the trimmed content in group 1. Useful for normalizing text files, removing indentation or extra spaces, especially when processing logs or data with multiline flags. The non-greedy capture ensures only the essential content is kept, while the 'gm' flags make it work per line.