What’s the actual difference between `$(...)+` and `$(...)*`

This confused me for a long time.

(I'm assuming you're referring to the syntax in macro_rules! declarations)

$(...)* and $(...)+ pull from regex syntax. * means "any number of this expression, including 0," while + means "at least one and maybe more of this expression, but definitely not 0."

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.