description( 'Test for regression against Yarr Interpreter is hanging in some cases of look-ahead regex patterns. It also tests some other related expressions.' ); shouldBe('/(?:(?=x))+/.exec("x")', '[""]'); shouldBe('/(?:a?)*/.exec("a")', '["a"]'); shouldBe('/(a|ab)*/.exec("abab")', '["a","a"]'); shouldBe('/(ab)+/.exec("abab")', '["abab","ab"]'); // The following tests fail because of pcre interpreter bug(s). shouldBe('/(|ab)*/.exec("ab")', '["ab","ab"]'); shouldBe('/(?:(|ab)*)/.exec("ab")', '["ab","ab"]'); shouldBe('/(?:(|ab)+)/.exec("ab")', '["ab","ab"]'); shouldBe('/(|ab)+/.exec("abab")', '["abab","ab"]');