Test, validate and match regular expressions
Matches Chemical Abstracts Service (CAS) registry numbers in the format of up to eight digits, a hyphen, two digits, a hyphen, and a single check digit. It is commonly used to identify chemical substances in databases, patents, and scientific literature. The pattern allows extraction and validation of CAS numbers, though it does not verify the checksum algorithm.