Regular Expressions 101

Library entries

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

Vote

0

Regular Expression
python

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

Description

Loading markdown...
Submitted by anonymous - 5 years ago