Test, validate and match regular expressions
This regex extracts the function name and optionally its enclosing class or namespace from C++ __PRETTY_FUNCTION__ strings. It matches a whitespace-separated signature prefix, including template arguments if present, and captures the function name in group 2 and the scope (e.g., class or namespace) in group 1. Useful for logging, debugging, or static analysis tools that need to parse function identifiers.