Test, validate and match regular expressions
Matches template placeholders like ${token} or ${token:type}, capturing the token name (word characters and dots, so dotted paths like config.value work) in group 1, and an optional type specifier after a colon (e.g., int, string) in group 2. Commonly used in string interpolation, template engines, or configuration parsers where a value is looked up by name and optionally converted to the given type. The gm flags find all placeholders across every line of input.