Skip to content

Commit

Permalink
Add new wildcard option
Browse files Browse the repository at this point in the history
  • Loading branch information
proginosko committed Jan 1, 2018
1 parent 454c8fe commit 934ddc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ function patternToRegExp(pattern) {
return "(www\\.)?" + pattern // assume optional www prefix
.replace(special, "\\$&") // fix special chars
.replace(/^www\\\./, "") // remove existing www prefix
.replace(/\*\\\+/g, ".+") // convert plus-wildcards
.replace(/\*{2,}/g, ".{STAR}") // convert super-wildcards
.replace(/\*/g, "[^\\/]{STAR}") // convert wildcards
.replace(/{STAR}/g, "*"); // convert stars
Expand Down

0 comments on commit 934ddc6

Please sign in to comment.