28 lines
2.3 KiB
Text
28 lines
2.3 KiB
Text
=== tests/cases/compiler/regExpWithSlashInCharClass.ts ===
|
|
var foo1 = "a/".replace(/.[/]/, "");
|
|
>foo1 : string
|
|
>"a/".replace(/.[/]/, "") : string
|
|
>"a/".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }
|
|
>"a/" : string
|
|
>replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }
|
|
>/.[/]/ : RegExp
|
|
>"" : string
|
|
|
|
var foo2 = "a//".replace(/.[//]/g, "");
|
|
>foo2 : string
|
|
>"a//".replace(/.[//]/g, "") : string
|
|
>"a//".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }
|
|
>"a//" : string
|
|
>replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }
|
|
>/.[//]/g : RegExp
|
|
>"" : string
|
|
|
|
var foo3 = "a/".replace(/.[/no sleep /till/]/, "bugfix");
|
|
>foo3 : string
|
|
>"a/".replace(/.[/no sleep /till/]/, "bugfix") : string
|
|
>"a/".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }
|
|
>"a/" : string
|
|
>replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }
|
|
>/.[/no sleep /till/]/ : RegExp
|
|
>"bugfix" : string
|
|
|