OLD | NEW |
| (Empty) |
1 Tests some regular expressions that used to overflow the regular expression comp
ilation preflight computation. | |
2 | |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 PASS /(\d)(\1{1})/.exec("11").toString() is "11,1,1" | |
7 PASS /^(\d{1,2})([ -:\/\.]{1})(\d{1,2})(\2{1})?(\d{2,4})?$/.exec("1:1").toString
() is "1:1,1,:,1,," | |
8 PASS /^(\d{4})([ -:\/\.]{1})(\d{1,2})(\2{1})(\d{1,2})T(\d{1,2})([ -:\/\.]{1})(\d
{1,2})(\7{1})(\d{1,2})Z$/.exec("1234:5:6T7/8/9Z").toString() is "1234:5:6T7/8/9Z
,1234,:,5,:,6,7,/,8,/,9" | |
9 PASS /\[["'\s]{0,1}([\w-]*)["'\s]{0,1}([\W]{0,1}=){0,2}["'\s]{0,1}([\w-]*)["'\s]
{0,1}\]$/.exec("[]").toString() is "[],,," | |
10 PASS /(x){0,2}/.exec("").toString() is "," | |
11 PASS /[¡]{4,6}/.exec("¡¡¡¡").toString() is "¡¡¡¡" | |
12 PASS /[¡]{1,100}[¡]{1,100}[¡]{1,100}[¡]{1,100}[¡]{1,100}[¡]{1,100}[¡]{1,100}[¡]{
1,100}/.exec("¡¡¡¡¡¡¡¡").toString() is "¡¡¡¡¡¡¡¡" | |
13 PASS /{([\D\-\ca]]„£µ+?)}|[[\B-\u00d4]√π- ]]]{0,3}/i.exec("B√π- ]]").t
oString() is "B√π- ]]," | |
14 PASS /|[x\B-\u00b5]/i.exec("").toString() is "" | |
15 PASS new RegExp(complexPattern).exec(complexInput)[0] is complexInput | |
16 PASS new RegExp(s); threw exception SyntaxError: Invalid regular expression: reg
ular expression too large. | |
17 | |
18 PASS successfullyParsed is true | |
19 | |
20 TEST COMPLETE | |
21 | |
OLD | NEW |