index.js
function toRegex(prefix) {
  var key = appendPrefix(prefix, '(\\d+)');
  if (cache.hasOwnProperty(key)) {
    return cache[key];
  }
  var regex = new RegExp(createRegexString(key), 'g');
  cache[key] = regex;
  return regex;
}
function toRegex(prefix) {
  var key = appendPrefix(prefix, '(\\d+)');
  if (cache.hasOwnProperty(key)) {
    return cache[key];
  }
  var regex = new RegExp(createRegexString(key), 'g');
  cache[key] = regex;
  return regex;
}
function toRegex ( prefix ) { var key = appendPrefix ( prefix , '(\\d+)' ) ; if ( cache . hasOwnProperty ( key ) ) { return cache [ key ] ; } var regex = new RegExp ( createRegexString ( key ) , 'g' ) ; cache [ key ] = regex ; return regex ; }
Create a regular expression based on the given `prefix`.
@param  {String} `prefix`
@return {RegExp}
Create a regular expression based on the given prefix .