Problem Description
If the shell retrieves a document from the server containing a BSONRegex field with an embedded PCRE expression, it will attempt to interpret the regex pattern under Javascript regex rules, and will fail.
Steps to Reproduce
See SERVER-54588.
Expected Results
The shell is capable of ingesting and displaying the document, including any non-Javascript-compatible regex fields.
Actual Results
The shell throws an exception when it attempts to interpret the PCRE regex.
Additional Notes
Drivers have already encountered this issue in the past and resolved it: DRIVERS-82.
- depends on
-
NODE-3150 Allow retrieving PCRE-style regexes in documents
- Closed
-
MONGOSH-845 Bump version of the driver to 4.0.0-beta.6
- Closed
- is related to
-
MONGOSH-1703 mongosh crash when converting invalid regular expression in db.currentOp()
- Closed
-
SERVER-54588 Query on system.profile() failing when certain regex is recorded
- Closed
-
DRIVERS-82 Don't compile BSON regexes to native regexes
- Closed
- split to
-
MONGOSH-857 Allow options in find() and findOne()
- Closed
-
MONGOSH-859 Expose BSONRegExp in the shell
- Closed