Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

mongodb check if substring in string

#all documents whose description field contains anywhere
#in the text the "beach" sub string
query = db.collection.find({
  "description" : {"$regex" : ".*beach.*"}
})
 
PREVIOUS NEXT
Tagged: #mongodb #check #substring #string
ADD COMMENT
Topic
Name
6+4 =