I was looking at the comments in another issue and found this suggestion:
switch a
m := /(\d)/
return m[1]
as a way of getting at groups within a matching regular expression.
I'm currently trying this, but it doesn't work:
switch a
m^ /(\d)/
return m
I thought that the result of the match would be assigned to the variable m
Your docs for pattern matching doesn't have examples of getting either the matched string or a subgroup from a regular expression.
Your docs need more (simple) examples of using regular expressions when pattern matching.
Meanwhile, is there any way to accomplish this using a switch statement?