Test, validate and match regular expressions
This regex matches hierarchical document clause numbers, including nested alphabetical sub-clauses often found in legal or technical cross-references. It effectively captures patterns like "1", "1.2", or "1.2(a)(b)". It is particularly useful for parsing complex numbering schemes in contracts, statutes, or structured specifications.