Skip to content

Commit 4b14d4e

Browse files
committed
Update index.ts
1 parent fe77044 commit 4b14d4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wildcard-matching/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function check_regular(s: string, p: string): boolean {
6262
// console.log("check_regular", s, p);
6363
return new RegExp(
6464
//@ts-ignore
65-
"^" + p.replaceAll("?", ".").replaceAll(/\*+/g, ".*") + "$",
65+
"^" + p.replaceAll("?", ".") + "$",
6666
"g",
6767
).test(s);
6868
}

0 commit comments

Comments
 (0)