TypeScript/tests/baselines/reference/parserRegularExpression2.js
Daniel Rosenwasser 35803db2e6 Fixed error when parsing slashes in RegExp literals.
Basically we weren't recognizing that a slash can occur in a character class, so we were bailing out too early on code like `/[/]/`.

Fixes issue #318.
2014-07-31 00:36:50 -07:00

6 lines
140 B
TypeScript

//// [parserRegularExpression2.ts]
href.match(/:\/\/(.[^/]+)/)[1];
//// [parserRegularExpression2.js]
href.match(/:\/\/(.[^/]+)/)[1];