function createRegexp (s) {
  let mExp = /^\/(.*)\/([gimy]*)$/.exec(s)
  if (mExp) {
    return new RegExp(mExp[1], mExp[2])
  } else {
    return new RegExp(s)
  }
}
function createRegexp (s) {
  let mExp = /^\/(.*)\/([gimy]*)$/.exec(s)
  if (mExp) {
    return new RegExp(mExp[1], mExp[2])
  } else {
    return new RegExp(s)
  }
}
function createRegexp ( s ) { let mExp = / ^\/(.*)\/([gimy]*)$ / . exec ( s ) if ( mExp ) { return new RegExp ( mExp [ 1 ] , mExp [ 2 ] ) } else { return new RegExp ( s ) } }
RegExp-finding RegExp: string starts with slash, ends with slash/flags
RegExp - finding RegExp : string starts with slash ends with slash / flags