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