r := regex.parse "a|b"
expect (r.match "a")
expect (r.match "b")
expect-not (r.match "c")
r = regex.parse "^a|b\$"
expect (r.match "a")
expect (r.match "b")
expect-not (r.match "c")
/^\d\d\d\d-\d\d-\d\d$/
re := RegExp "^\\d\\d\\d\\d-\\d\\d-\\d\\d\$"