Optional captures throw fatal error when not present
Closed this issue · 3 comments
danielbreves commented
e.g.
let fooRegex = Regex("(foo)?bar")
print(fooRegex.match("bar")?.captures) // fatal error: subscript: subRange extends past String end
danielbreves commented
Sorry, just noticed #20.
sharplet commented
Just FYI, this is available on master now. I'd also like to push 0.3 soon!
danielbreves commented
Awesome, thanks for the quick turnaround!