Para expresiones regulares puede usar string.match
db.getCollectionNames().forEach(function(c) {
if(!c.match("^system.indexes")) {
db.getCollection(c).drop();
}
});
Para expresiones regulares puede usar string.match
db.getCollectionNames().forEach(function(c) {
if(!c.match("^system.indexes")) {
db.getCollection(c).drop();
}
});