showing results for - "mongodb replace string regex"
Shayne
10 Nov 2017
1db.collection.updateMany(
2  { name: { $regex: stringToReplace } },
3  [{
4    $set: { name: {
5      $replaceAll: { input: "$name", find: stringToReplace, replacement: "" }
6    }}
7  }]
8)