fixed a small bug in the regexp.
This commit is contained in:
parent
224426be35
commit
3552203e99
@ -12,7 +12,7 @@ roll_dice() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rollString="${3##* }"
|
rollString="${3##* }"
|
||||||
if ! [[ "$rollString" =~ ^[1-9]+[dD][1-9][0-9]*$ ]]; then
|
if ! [[ "$rollString" =~ ^[1-9][0-9]*[dD][1-9][0-9]*$ ]]; then
|
||||||
msg "$2" "${1}: Usage is roll #d# where # is greater than 0."
|
msg "$2" "${1}: Usage is roll #d# where # is greater than 0."
|
||||||
else
|
else
|
||||||
msg "$2" "$1:: I rolled ${rollString} and got a total of $(roll_dice ${rollString})."
|
msg "$2" "$1:: I rolled ${rollString} and got a total of $(roll_dice ${rollString})."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user