77PASS testString.replace('end','BEGINNING') is "It's the BEGINNING of the world as we know it, and I feel fine."
88PASS testString.replace(/[aeiou]/gi,'-') is "-t's th- -nd -f th- w-rld -s w- kn-w -t, -nd - f--l f-n-."
99PASS testString.replace(/[aeiou]/gi, function Capitalize(s){ return s.toUpperCase(); }) is "It's thE End Of thE wOrld As wE knOw It, And I fEEl fInE."
10PASS testString.replace(/([aeiou])([a-z])/g, function Capitalize(){ return RegExp.$1.toUpperCase()+RegExp.$2; }) is "It's the End Of the wOrld As we knOw It, And I fEel fIne."
10FAIL testString.replace(/([aeiou])([a-z])/g, function Capitalize(){ return RegExp.$1.toUpperCase()+RegExp.$2; }) should be It's the End Of the wOrld As we knOw It, And I fEel fIne.. Was It's the Ind In the wInld In we knIn In, Ind I fInl fIne..
1111PASS testString.replace(/([aeiou])([a-z])/g, function Capitalize(orig,re1,re2) { return re1.toUpperCase()+re2; }) is "It's the End Of the wOrld As we knOw It, And I fEel fIne."
1212PASS testString.replace(/(.*)/g, function replaceWithDollars(matchGroup) { return '$1'; }) is "$1$1"
1313PASS testString.replace(/(.)(.*)/g, function replaceWithMultipleDollars(matchGroup) { return '$1$2'; }) is "$1$2"
1414PASS testString.replace(/(.)(.*)/, function checkReplacementArguments() { return arguments.length; }) is "5"
1515PASS testReplace(/x/g, false) is "0y1y2"
16FAIL testReplace(/x/g, true) should throw an exception. Was 0y1y2.
16PASS testReplace(/x/g, true) threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'.
1717PASS testReplace(/x/, false) is "0y1x2"
1818PASS testReplace(/x/, true) is "0y1x2"
1919PASS testReplace(/x/g, false); re.lastIndex is 0
20FAIL testReplace(/x/g, true); re.lastIndex should throw an exception. Was 3.
20PASS testReplace(/x/g, true); re.lastIndex threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'.
2121PASS testReplace(/x/, false); re.lastIndex is 3
2222PASS testReplace(/x/, true); re.lastIndex is 3
2323PASS testReplace(/x/g, false) is "0y1y2"
24FAIL testReplace(/x/g, true) should throw an exception. Was 0y1y2.
24PASS testReplace(/x/g, true) threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'.
2525PASS testReplace(/x/, false) is "0y1x2"
2626PASS testReplace(/x/, true) is "0y1x2"
2727PASS testReplace(/x/g, false); re.lastIndex is 0
28FAIL testReplace(/x/g, true); re.lastIndex should throw an exception. Was 3.
28PASS testReplace(/x/g, true); re.lastIndex threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'.
2929PASS testReplace(/x/, false); re.lastIndex is 3
3030PASS testReplace(/x/, true); re.lastIndex is 3
3131PASS testReplace(/x/g, false) is "01122"
32PASS testReplace(/x/g, true) threw exception TypeError: Cannot assign to read only property 'lastIndex' of [object RegExp].
32PASS testReplace(/x/g, true) threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'.
3333PASS testReplace(/x/, false) is "041x2"
34PASS testReplace(/x/, true) threw exception TypeError: Cannot assign to read only property 'lastIndex' of [object RegExp].
34PASS testReplace(/x/, true) threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'.
3535PASS testReplace(/x/g, false); re.lastIndex is 2
36PASS testReplace(/x/g, true); re.lastIndex threw exception TypeError: Cannot assign to read only property 'lastIndex' of [object RegExp].
36PASS testReplace(/x/g, true); re.lastIndex threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'.
3737PASS testReplace(/x/, false); re.lastIndex is 4
38PASS testReplace(/x/, true); re.lastIndex threw exception TypeError: Cannot assign to read only property 'lastIndex' of [object RegExp].
38PASS testReplace(/x/, true); re.lastIndex threw exception TypeError: Cannot assign to read only property 'lastIndex' of object '[object RegExp]'.
3939PASS try { testReplace(/x/g, false); throw 0; } catch (e) { }; replacerCalled; is true
40FAIL try { testReplace(/x/g, true); throw 0; } catch (e) { }; replacerCalled; should be false. Was true.
40PASS try { testReplace(/x/g, true); throw 0; } catch (e) { }; replacerCalled; is false
4141PASS successfullyParsed is true
4242
4343TEST COMPLETE
4444