Featured
-
How to solve [MongoError: connect ECONNREFUSED]
Hello Readers, I came across a solution while w
by saroj.singh
Tags
How to query mongodb with like
In MySql you have normally used below code to find by like
select * from users where name like '%text%'
But in order to use like in mongoDb you have write the below code:-
You can use the actual regex object via MongoRegex
db.collec...
MongoDB : Regex
MongoDB - Regular Expression
In MongoDB if we need to find record with certain pattern, then we can use regular expression. It is also "like" query in SQL.
e.g. If we want to find user email matching with "findnerd.com" pattern.
db.colle...