Build, test, and debug regular expressions
This regular expression matches code blocks starting with 'define' followed by an opening brace, and then locates a 'var' declaration within that block. It captures various parts of the definition and the variable declaration, including the variable name and its assigned value up to a comma or semicolon. It is specifically useful for refactoring tasks in code, such as searching for variables to insert underscores or modify their naming conventions.