File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -342,6 +342,36 @@ For more query examples, see
342
342
:manual:`Query Documents </tutorial/query-documents/>`
343
343
in the MongoDB manual.
344
344
345
+ Match by Substring
346
+ ~~~~~~~~~~~~~~~~~~
347
+
348
+ The following query filter uses the :query:`$regex` operator
349
+ to find all documents where the value of ``email`` includes the term
350
+ "andrea_le":
351
+
352
+ .. code-block:: shell
353
+
354
+ { email: { $regex: "andrea_le" } }
355
+
356
+ The query returns the following document:
357
+
358
+ .. code-block:: JSON
359
+ :copyable: false
360
+ :emphasize-lines: 4
361
+
362
+ {
363
+ "_id": { "$oid": "5e349915cebae490877d561d" },
364
+ "name": "Andrea Le",
365
+ "email": "andrea_le@fake-mail.com",
366
+ "version": 5,
367
+ "scores": [ 85, 95, 75 ],
368
+ "dateCreated": { "$date": "2003-03-26" }
369
+ }
370
+
371
+ For more query examples, see
372
+ :manual:`Query Documents </tutorial/query-documents/>`
373
+ in the MongoDB manual.
374
+
345
375
Supported Data Types in the Query Bar
346
376
-------------------------------------
347
377
You can’t perform that action at this time.
0 commit comments