[#]Rakulang grammar question. Given something like:
[#] Ex. 1 grammar CSV { TOP {} # ?? token column { [ '"' ]? .* \, [ '"']? } } [#] Ex. 2 grammar USD { TOP {} # ?? token dollars { \d ** 3 [',']? } token cents { \. \d ** 2 } }
[#]programming #linux
=> More informations about this toot | More toots from profoundlynerdy@bitbang.social
@profoundlynerdy For example two, you could consider starting the match with [1-9] instead of \d, to prohibit leading zeros
=> More informations about this toot | More toots from clarkema@mastodon.social
@clarkema So, something like this:
[1..9] \d 0..2 [',']?
Is that right, or did I screw something up?
=> More informations about this toot | More toots from profoundlynerdy@bitbang.social
@profoundlynerdy Had to go and scratch my head for a while! This is not exhaustively tested, but should be a starting point:
=> More informations about this toot | More toots from clarkema@mastodon.social
@clarkema Does order of token declaration matter in this (or any) case?
=> More informations about this toot | More toots from profoundlynerdy@bitbang.social
@profoundlynerdy Nope
=> More informations about this toot | More toots from clarkema@mastodon.social
text/gemini
This content has been proxied by September (3851b).