blob: 75612dbc735dccd27323ae1b1c4d721909f61858 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
var sText = "s";
for (var i = 0; i < 250000; ++i)
sText += 'a\n';
sText += 'e';
var start = new Date();
var match = sText.match(/s(\s|.)*?e/gi);
//var match = sText.match(/s([\s\S]*?)e/gi);
//var match = sText.match(/s(?:[\s\S]*?)e/gi);
var end = new Date();
assertEq(match.length, 1);
|