Build, test, and debug regular expressions
Matches template placeholders starting with a dollar sign, followed by a type of 'c' or 'n' (optionally with a trailing digit), plus an optional curly-braced ranges/options block. The named groups capture the type and the range contents (e.g. $n{1-10} for random numbers or $c{red,green} for random choices). Used with the global flag to find all placeholders in a string, typical for dice/random text generation systems.