[COMPASS-3664] Cannot use some Regex expressions in Compas editor Created: 22/May/19  Updated: 05/Jun/19  Resolved: 05/Jun/19

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: 1.17.0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Piotr Blazejewicz Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

the expression:

 $regex: /Won \d{1,2} Oscars?/

is a valid expression in the language query, but it fails to compile in Compass editor:

Expected "[" or AggregationStage but "{" found.



 Comments   
Comment by Massimiliano Marcon [ 05/Jun/19 ]

In Compass you can use $regex in its string form:

{ <field>: { $regex: 'pattern', $options: '<options>' } } 

Alternatively, you can use the RegExp javascript object.

Generated at Wed Feb 07 22:33:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.