VietMX's Blog
  • C++
  • JAVA
  • JS
  • NODEJS
  • PYTHON
  • TOOLS
  • BLOCKCHAIN
  • AI
    • EBOOK
  • ALGORITHM
    • BIG DATA
  • FRAMEWORK
  • Q&A

How to check if a field contains a substring?

Technology Community › Category: MongoDB › How to check if a field contains a substring?
0 Vote Up Vote Down
VietMX Staff asked 1 year ago

Consider:

db.users.findOne({"username" : {$regex : ".*subsctring.*"}});
Question Tags: MongoDB, Senior Level
CONTACT INFORMATION
  • Email: maixuanviet.com@gmail.com
  • Skype: maixuanviet.com@outlook.com
  • WhatsApp and Phone: +84938680277
  • Github: https://github.com/vietmx
FRIEND EXTERNAL LINKS
  • Crypto Robo-advisor
  • Tetris Game
  • LTTK Education

DMCA.com Protection Status