Regular Expressions 101

Library entries

Dice roll notation

Vote

0

Regular Expression
javascript

/
(?<operator>[+\-])?(?:(?<dice>(?<numberOfDice>[\d]+)?[dD](?<faces>[\d]+)(?<explode>![\d]*)?(?<implode>ยก[\d]*)?(?<selective>[kd][\d]+)?)|(?<constant>[\d]+))
/
gm

Description

Loading markdown...
Submitted by anonymous - a year ago