Created
September 26, 2014 17:26
-
-
Save OctavioBR/d03a5619a4deede23117 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
regExp = /collectionPrefix_*/; | |
db.getCollectionNames().filter(function(name){ | |
return name.match(regExp) | |
}).forEach(function(name){ | |
db.getCollection(name).drop() | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment