Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • MongoDB : Regex

    • 0
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 522
    Comment on it

    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.collection.find({email: new RegExp('.*@findnerd.com')})
    

    Above query return all email ids with ending with @findnerd.com.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: