packages/extension-map/lib/regex_extension.js
/**
 * Strip any starting and trailing / char, ignoring leading & trailing whitespace
 */
Strip any starting and trailing / char, ignoring leading & trailing whitespace
Strip any starting and trailing / char ignoring leading & trailing whitespace
function trimPattern(args) { 
    if (/^\s*\/.*\/\s*$/.test(args)) {   
        args = /^\s*\/(.*)\/\s*$/.exec(args)[1];
        if (args.length < 1) throw Error(mapDirective + ' is missing the required regex pattern');
    }
    return args;
}
function trimPattern ( args ) { if ( / ^\s*\/.*\/\s*$ / . test ( args ) ) { args = / ^\s*\/(.*)\/\s*$ / . exec ( args ) [ 1 ] ; if ( args . length < 1 ) throw Error ( mapDirective + ' is missing the required regex pattern' ) ; } return args ; }
Strip any starting and trailing / char, ignoring leading & trailing whitespace
Strip any starting and trailing / char ignoring leading & trailing whitespace