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 ....
No need to use substitution this way ${}. You can use vanilla javascript
const pattern = new RegExp("^hello(");
db.test.find({keyword:{'$regex': pattern})