function getBareString(str) {
      let result = str.trim()

      if (allowlistRe) {
        result = result.replace(allowlistRe, '')
      }

      for (const regex of regexAllowlist) {
        const flags = regex.flags.includes('g')
          ? regex.flags
          : `${regex.flags}g`
        const globalRegex = new RegExp(regex.source, flags)
        result = result.replace(globalRegex, '')
      }

      return result.trim()
    }
Gets the bare string from given string
@param {string} str