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.
10 lines
353 B
TypeScript
10 lines
353 B
TypeScript
//// [regExpWithSlashInCharClass.ts]
|
|
var foo1 = "a/".replace(/.[/]/, "");
|
|
var foo2 = "a//".replace(/.[//]/g, "");
|
|
var foo3 = "a/".replace(/.[/no sleep /till/]/, "bugfix");
|
|
|
|
|
|
//// [regExpWithSlashInCharClass.js]
|
|
var foo1 = "a/".replace(/.[/]/, "");
|
|
var foo2 = "a//".replace(/.[//]/g, "");
|
|
var foo3 = "a/".replace(/.[/no sleep /till/]/, "bugfix");
|