Was using 'g' flag instead of 'm' and wasn't really testing the multiline

functionality (assuming I interpreted the intent correctly).
This commit is contained in:
rogerl%netscape.com 1999-08-04 22:24:57 +00:00
Родитель daab979848
Коммит 1355cfb383
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -16,9 +16,9 @@
var woodpeckers = "ivory-billed\ndowny\nhairy\nacorn\nyellow-bellied sapsucker\n" +
"northern flicker\npileated\n";
AddRegExpCases( /[d]$/g, woodpeckers, woodpeckers.indexOf("ivory-billed"), ["ivory-billed"] );
AddRegExpCases( /.*[y]$/m, woodpeckers, woodpeckers.indexOf("downy"), ["downy"] );
AddRegExpCases( /[d]$/m, woodpeckers, woodpeckers.indexOf("ivory-billed"), ["ivory-billed"] );
AddRegExpCases( /.*[d]$/m, woodpeckers, woodpeckers.indexOf("ivory-billed"), ["ivory-billed"] );
test();