MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1g6kat3/mongodbwasamistake/lskgcf8/?context=3
r/ProgrammerHumor • u/fisadev • Oct 18 '24
446 comments sorted by
View all comments
Show parent comment
14
Single quotes will work fine in pretty much any MongoDB client. Also you don't need the quotes around "skeptical" at all.
And JSON and MongoDB JSON are not exactly the same.
This is valid MongoDB JSON for example
{ name: { $regex: /acme.*corp/i, $nin: [ 'acmeblahcorp' ] } }
https://www.mongodb.com/docs/manual/reference/operator/query/regex/
View all comments
Show parent comment
14
u/theturtlemafiamusic Oct 18 '24
Single quotes will work fine in pretty much any MongoDB client. Also you don't need the quotes around "skeptical" at all.
And JSON and MongoDB JSON are not exactly the same.
This is valid MongoDB JSON for example
https://www.mongodb.com/docs/manual/reference/operator/query/regex/