Test, validate and match regular expressions
This regex matches lines containing a Lua `return` statement, capturing any trailing characters until the end of the line or string. It accommodates optional trailing whitespace, making it useful for static code analysis, formatting, or detecting module exports at the end of Lua files.