Skip to content

Update die regex and if #1

@shindakun

Description

@shindakun
	matched, _ := regexp.MatchString("^[1-9]d([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$", s)
	if matched == false {
		return -1, errors.New("roll again using a format like 1d20 to roll one twenty sided die")
	}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions