Multiple scripts that roll dice using dice notation.
> sh roll.sh 2d10+4
> lua roll.lua 2d10+4
> perl roll.pl 2d10+4
> php roll.php 2d10+4
> Rscript roll.r 2d10+4
/(?:(\d+)\sX\s)?(\d*)D(\d*)((?:[+/*-]\d+)|(?:[+-][LH]))?/i
Multiple scripts that roll dice using dice notation.
> sh roll.sh 2d10+4
> lua roll.lua 2d10+4
> perl roll.pl 2d10+4
> php roll.php 2d10+4
> Rscript roll.r 2d10+4
/(?:(\d+)\sX\s)?(\d*)D(\d*)((?:[+/*-]\d+)|(?:[+-][LH]))?/i