Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 380 Bytes

README.md

File metadata and controls

37 lines (24 loc) · 380 Bytes

Dice

Multiple scripts that roll dice using dice notation.

Bash

> sh roll.sh 2d10+4

Lua

> lua roll.lua 2d10+4

Perl

> perl roll.pl 2d10+4

PHP

> php roll.php 2d10+4

R

> Rscript roll.r 2d10+4

Dice Regex

/(?:(\d+)\sX\s)?(\d*)D(\d*)((?:[+/*-]\d+)|(?:[+-][LH]))?/i