Test, validate and match regular expressions
This regex matches function definitions that contain nested if statements with additional function declarations inside. It's useful for code linting to identify nested function patterns that may indicate complex or hard-to-maintain code structures.