$regex operator called with non regular expression
See original GitHub issueI’m trying to search string using regex as below:
db.find({ consignee: { $regex: /test/ } }, function (err, docs) {
console.log(docs);
});
But it is throwing error Error: $regex operator called with non regular expression
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:9 (1 by maintainers)
Top Results From Across the Web
NeDB regex operator called with non regular expression
NeDB regex operator called with non regular expression ... I'm trying to search string using regex as below: db.find({ consignee: { $regex: ...
Read more >Regex - Common Operators
This operator concatenates two regular expressions a and b . No character represents this operator; you simply put b after a . The...
Read more >Regular Expression (Regex) Tutorial
The + , known as occurrence indicator (or repetition operator), indicates one or more occurrences ( 1+ ) of the previous sub-expression. In...
Read more >Regular expressions - JavaScript - MDN Web Docs
Unicode regular expressions do not support so-called "identity escapes"; that is, patterns where an escaping backslash is not needed and ...
Read more >Regular Expressions
epsilon which denotes the empty string containing no characters. null which denotes the empty set of strings. Operators used in regular expressions include:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Use
{ $regex: new RegExp('test') }
instead{ $regex: /test/ }
I replaced nedb with sqlite, performance are better and migration was not so painful