(let [match (R.match "a" "12abc")] (case match ((object left "12" match "a" right "bc")) (otherwise (throw "bad match result")))) (let [matches (R.distinctMatches "a" "abababab")] (assert (= 4 matches.length)))