Build, test, and debug regular expressions
This regex captures text enclosed in parentheses: group 1 matches the full expression including the parentheses, while group 2 extracts only the inner content using a non-greedy quantifier. The lazy matching ensures it stops at the first closing parenthesis, so it correctly handles multiple parenthesized pairs on the same line. With global and multiline flags, it finds every parenthesized segment across all lines. Typical use cases include extracting annotations, abbreviations, or function arguments from text or code.