query-engine icon indicating copy to clipboard operation
query-engine copied to clipboard

Support for $regex?

Open Reggino opened this issue 12 years ago • 3 comments

Awesome project, thanks!

When writing a query using the syntax as mentioned here: http://docs.mongodb.org/manual/reference/operator/regex/

query-engine throws an error. To be more specific: the query:

{ field: { $regex: 'acme.*corp', $options: 'i' } }

results in:

Error: Couldn't find the selector $regexp

Reggino avatar Sep 26 '13 15:09 Reggino

Hrmm, we don't support that syntax, but we do support regexes, just do {field: /acme.*corp/i} and you'll be good. If someone can mention this in our "differences from mongodb docs" that would be great.

balupton avatar Dec 19 '13 06:12 balupton

The only thing is, the former syntax is much easier to serialize for e.g. AJAX requests... Consider a JavaScript browser-application, trying to query on the server, passing that query using AJAX. I think the standardized syntax offers an advantage here.

Reggino avatar Dec 19 '13 07:12 Reggino

Any plans to support $regex ?

dcolens avatar Apr 17 '14 07:04 dcolens