Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
regex and case insensitive
#9
(Jul-19-2020, 08:53 PM)bowlofred Wrote: Can you give an example of what one of your $regex is set to? Looks like mongo can take the perl-style /$regex/i form.


I made it, after checking 2000 websites, none of them was giving me the answer, and the answer was actually the simplest. Just needed to understand the logic of the syntax:


query={"ingredients": { "$regex": keyword, "$options": "i" }}
Thank you!
Reply


Messages In This Thread
regex and case insensitive - by Leon79 - Jul-19-2020, 06:44 PM
RE: regex and case insensitive - by bowlofred - Jul-19-2020, 07:57 PM
RE: regex and case insensitive - by Leon79 - Jul-19-2020, 08:13 PM
RE: regex and case insensitive - by bowlofred - Jul-19-2020, 08:26 PM
RE: regex and case insensitive - by Leon79 - Jul-19-2020, 08:28 PM
RE: regex and case insensitive - by bowlofred - Jul-19-2020, 08:31 PM
RE: regex and case insensitive - by Leon79 - Jul-19-2020, 08:37 PM
RE: regex and case insensitive - by bowlofred - Jul-19-2020, 08:53 PM
RE: regex and case insensitive - by Leon79 - Jul-20-2020, 11:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Switch case or match case? Frankduc 9 4,540 Jan-20-2022, 01:56 PM
Last Post: Frankduc
  If this and that "case insensitive" tester_V 5 2,304 Aug-23-2020, 05:37 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020