Skip to content

Instantly share code, notes, and snippets.

@janzenz
Created June 29, 2017 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janzenz/85cb6bbcdff1cedcb860352df6373cda to your computer and use it in GitHub Desktop.
Save janzenz/85cb6bbcdff1cedcb860352df6373cda to your computer and use it in GitHub Desktop.
Mongo Query for Patients with invalid MMJ Card
db.getCollection('Patients').find({
mmjCardNumber: { $not: /^[0-9]{7}[a-zA-Z]{4}[0-9]{9}$/ }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment