Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
Cómo encontrar el medio de la cadena, junto al espacio y el punto en MongoDB
 [ { "Name": "Dr.Soma", "Email": "drsoma@gmail.com", "MobNo": 111111111 }, { "Name": "Bootha Ganesh", "Email": "boothaganesg@gmail.com", "MobNo": 222222222 }, { "Name": "Steven", "Email": "steven@gmail.com", "MobNo": 333333333 }, { "Name": "Dr.Anbarasi", "Email": "anbarasi@gmail.com", "MobNo": 4444444444 } ]

Intento esto para usar find regex

 db.details.find({Name:{$regex:/steven/i}})

producción:

 { "Name": "Steven", "Email": "steven@gmail.com", "MobNo": 333333333 }

Cómo encontrar datos Nombre punto (.) después de Soma & Espacio después de Ganesh
Salida exceptuada
Si encuentro Nombre Ganesh, necesito

 { "Name": "Bootha Ganesh", "Email": "boothaganesg@gmail.com", "MobNo": 222222222 }

Si encuentro Nombre minúscula o S mayúscula, necesito

 { "Name": "Dr.Soma", "Email": "drsoma@gmail.com", "MobNo": 111111111 }

No necesita datos de nombre Dr.Anbarasi

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

db.collection.find({ Name: { $regex: "Soma" } })

parque infantil mongo


 db.collection.find({ Name: { $regex: ".Soma" } })

parque infantil mongo


 db.collection.find({ Name: { $regex: " Ganesh" } })

parque infantil mongo

over 4 years ago · Santiago Trujillo Report

0

db.collection.find({"Name": {'$regex': /\bsoma[a-zA-Z0-9]*/gi}})

\b afirmar la posición en el límite de una palabra : (^\w | \w$ | \W\w|\w\W)
soma-para buscar valor
[a-zA-Z0-9] -caracteres de palabras
*-a toda la cadena

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!