Test, validate and match regular expressions
Matches a line consisting of a numeric coefficient followed by a species name, capturing each part separately. Group 1 grabs the leading digits (e.g., the stoichiometric coefficient), a lazily matched optional space is skipped, and Group 2 captures an identifier starting with a letter followed by word characters, such as '2H2O' yielding coefficient '2' and species 'H2O'. With global and multiline flags, it parses every term in a multi-line list, making it useful for chemistry reaction or species-term parsing.