lib/url-pattern/url-match-pattern.js
function (pattern) {
        // Escape everything except ? and *.
        pattern = pattern.replace(regexes.escapeMatcher, regexes.escapeMatchReplacement);
        pattern = pattern.replace(regexes.questionmarkMatcher, regexes.questionmarkReplacment);
        pattern = pattern.replace(regexes.starMatcher, regexes.starReplacement);
        return new RegExp(PREFIX_DELIMITER + pattern + POSTFIX_DELIMITER);
    }
function (pattern) {
        // Escape everything except ? and *.
        pattern = pattern.replace(regexes.escapeMatcher, regexes.escapeMatchReplacement);
        pattern = pattern.replace(regexes.questionmarkMatcher, regexes.questionmarkReplacment);
        pattern = pattern.replace(regexes.starMatcher, regexes.starReplacement);
        return new RegExp(PREFIX_DELIMITER + pattern + POSTFIX_DELIMITER);
    }
function ( pattern ) { // Escape everything except ? and *. pattern = pattern . replace ( regexes . escapeMatcher , regexes . escapeMatchReplacement ) ; pattern = pattern . replace ( regexes . questionmarkMatcher , regexes . questionmarkReplacment ) ; pattern = pattern . replace ( regexes . starMatcher , regexes . starReplacement ) ; return new RegExp ( PREFIX_DELIMITER + pattern + POSTFIX_DELIMITER ) ; }
Converts a given glob pattern into a regular expression.

@private
@param {String} pattern Glob pattern string
@return {RegExp=}
Converts a given glob pattern into a regular expression .