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

97
Views
I want to a variable value in like in mongodb

I want to put a variable value in like in mongodb

const value = "hello("

db.test.find({keyword:/^${value}/ })
but it wasn't work i don't no how to solve it

and no use $regex...

please help me ....

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

No need to use substitution this way ${}. You can use vanilla javascript

const pattern = new RegExp("^hello(");
db.test.find({keyword:{'$regex': pattern})
about 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!