Regular Expressions 101

Community Patterns

divide a dice roll string into the number of dice, the dices sides and a constant

0

Regular Expression
Python

r"
(?P<num_dice>\d+)[dwDW](?P<die_size>\d+)(?P<modifier>[\+\-]\d+)?
"
g

Description

no description available

Submitted by anonymous - 7 years ago