MongoDB mengganti string regex

db.collection.updateMany(
  { name: { $regex: stringToReplace } },
  [{
    $set: { name: {
      $replaceAll: { input: "$name", find: stringToReplace, replacement: "" }
    }}
  }]
)
Lucas Charvolin