Test, validate and match regular expressions
This regex matches class declarations in source code, capturing leading indentation and the class name. It is useful for parsing code structures, identifying class definitions, or building code analyzers. The pattern requires the word 'class' preceded by optional spaces, followed by whitespace and a valid identifier, with '.*' matching any remaining text on the line. Use with the global flag to find multiple class declarations.