Test, validate and match regular expressions
A pattern intended to match parenthesized text (including simple nested cases) so it can be stripped from strings, e.g., cleaning parenthetical remarks or annotations from documents. It starts at a literal '(' and permits word characters, additional opening parens, and any non-parenthesis characters, before closing with one or more ')' characters. Used with global and multiline flags to remove every bracketed segment on each line. Note the pattern is greedy and may over-match across adjacent bracket groups.