Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How can I use a regex variable in a query for MongoDB

var stream = collection.find({"FirstName": new RegExp(val)}).stream();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #I #regex #variable #query #MongoDB
ADD COMMENT
Topic
Name
6+1 =