You have to pass gi flags as second argument to RegExp
Actually, getting RegEx from user and executing is a bad idea
o why though?, actually thats the only way mongodb allows u to query database based on a search pattern
if u r concerned about some special characters or garbage values which user might enter.. we can always filter out those char right?
https://www.rexegg.com/regex-explosive-quantifiers.html
Обсуждают сегодня