Test, validate and match regular expressions
This regular expression matches a Lua code block that begins with a `return` statement and ends with the `end` keyword, typically used for anonymous functions. By using `(\s|.)+`, it matches any character in between, including newlines. It optionally captures a trailing closing parenthesis and any ending whitespace before the end of the string, which is highly useful for parsing Lua scripts.