Created
February 3, 2014 16:30
-
-
Save seti123/8787151 to your computer and use it in GitHub Desktop.
Update docs in Mongo DB with RegEx match
This file contains 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
db.test.find('/MyPattern/i.test(JSON.stringify(this))').forEach (function(x) { x.tags='test';db.test.save(x) } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment