зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
daab979848
Коммит
1355cfb383
|
@ -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();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче