MongoDB Zastąp regex string

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