3 ms·
> Here, the square brackets group together the two alternatives: '+' | '-' I'm sure there's some utterly fascinating reason why they threw the decades old grou
by mdaniel 4y ago
> Here, the square brackets group together the two alternatives: '+' | '-'
I'm sure there's some utterly fascinating reason why they threw the decades old grouping syntax of "('+' | '-')" in the trash, thus creating the uncanny valley of grammar syntaxes :-(
- db48x 4y agoThey didn’t. Parentheses both group and capture, while square brackets just group without capturing. https://docs.raku.org/language/regexes#Grouping_and_capturing https://docs.raku.org/language/regexes#Grouping_and_capturin...