Test for regression against Wrong result in case of non-iterative matching of subpatterns in non-greedy cases in YARR Interpreter On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS "a".match(/(a)??/) is ["", undefined] PASS "b".match(/(a)??/) is ["", undefined] PASS "ab".match(/(a)??b/) is ["ab", "a"] PASS "aaab".match(/(a+)??b/) is ["aaab", "aaa"] PASS "abbc".match(/(a)??(b+)??c/) is ["abbc", "a", "bb"] PASS "ac".match(/(a)??(b)??c/) is ["ac", "a", undefined] PASS "abc".match(/(a(b)??)??c/) is ["abc", "ab", "b"] PASS "ac".match(/(a(b)??)??c/) is ["ac", "a", undefined] PASS successfullyParsed is true TEST COMPLETE