Build, test, and debug regular expressions
This regex matches tabletop RPG dice roll commands (like '2d10+5' or '1D20-3') and extracts the number of dice, dice sides, and the modifier. It uses Python-compatible named capture groups to easily access the count, dice type, modifier sign, and modifier value. It is specifically designed to parse standard D&D notation.