summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testStaticsInRegExp.js
blob: 16d8698744ef191c82a23db952cf05ab3cbe172a (plain)
1
2
3
4
5
6
7
8
'abcdef'.replace(/a(\w+)c/, function() {
    assertEq(RegExp.lastMatch, 'abc');
    '123456'.replace(/1(\d+)3/, function() {
        assertEq(RegExp.lastMatch, '123');
    });
    assertEq(RegExp.lastMatch, '123');
});
assertEq(RegExp.lastMatch, '123');