Build, test, and debug regular expressions
This regex parses patent identifiers by splitting them into three capture groups: a two-letter country code (e.g., US, EP, WO), a numeric serial portion that may contain forward slashes (common in application numbers like 2018/123456), and a kind code made of a letter followed by a digit (e.g., A1, B2). With global and multiline flags, it can find multiple patent numbers across all lines of a document. Typical use cases include patent database ingestion, document processing, and extracting structured patent parts from unstructured text.