RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
(?<dice>\d*)(?<dsides>(?<separator>[\d\D])(?<sides>\d+))(?<modifier>(?<sign>[\+\-])(?<addend>\d))?
Description
D&amp;D dice: If no dice are entered, 1 can be assumed. d or D is required to indicate sides, and cannot exist without a sides digit. The modifier is optional. However, if there is a modifier, a sign and an addend must be included.
Matches
2d6+4 | 2d6 | d6+4
Non-Matches
6- | d | 2d
Author Rating: Not yet rated. Janine White
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials