DiceParser icon indicating copy to clipboard operation
DiceParser copied to clipboard

if/switch can't check non-numeric values

Open wilcoxon opened this issue 2 years ago • 0 comments

This simple macro shows the issue. I also tried it with quotes around the f and d in the conditionals:

sym\((\d+)([fd])?(?:,(.*))?\) \2S[=f]{"got F"}[=d]{"got D"}{"got none"} true

The regex works fine and does indeed pick up the f or d (if present) as \2. I verified that with this simple macro:

sym\((\d+)([fd])?(?:,(.*))?\) "1 = \1; 2 = \2; 3 = \3" true

wilcoxon avatar Jul 21 '21 20:07 wilcoxon