Build, test, and debug regular expressions
This regular expression matches a numbered list item starting with '1. [' and captures subsequent characters across multiple lines until an empty line is reached. It is designed to extract Table of Contents (ToC) sections or similar multiline blocks from documents. The inline modifier (?s) enables dotall mode for the rest of the pattern, allowing it to span across lines, while the global, multiline, and case-insensitive flags ensure broad matching.