Skip to content

Remove 's' regex flag from extended JSON #2492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

devkev
Copy link
Contributor

@devkev devkev commented Jan 3, 2016

I tested the mongo shell of every stable version between 1.6.0 and 3.2.0, and none support 's' as a valid flag.


This change is Reviewable

I tested the mongo shell of every stable version between 1.6.0 and 3.2.0, and none support 's' as a valid flag.
@kay-kim
Copy link
Contributor

kay-kim commented May 2, 2016

Hey @devkev --
I'm able to use the s flag.
~/Mongo $ ./mongodb-3.2.4/bin/mongoexport -d test -c products --query '{ description: /m.*line/si }'
2016-05-02T10:33:59.813-0400 connected to: localhost
{"_id":102.0,"sku":"xyz456","description":"Many spaces before line"}
{"_id":103.0,"sku":"xyz789","description":"Multiple\nline description"}
2016-05-02T10:33:59.813-0400 exported 2 records
~/Mongo $ ./mongodb-3.2.4/bin/mongoexport -d test -c products --query '{ description: /m.*line/i }'
2016-05-02T10:34:04.620-0400 connected to: localhost
{"_id":102.0,"sku":"xyz456","description":"Many spaces before line"}
2016-05-02T10:34:04.620-0400 exported 1 record

@devkev
Copy link
Contributor Author

devkev commented May 4, 2016

Ugh. This has made me realise that this is actually a much bigger problem.

The issue is that mongo server/shell uses SpiderMonkey (in 3.2+, earlier versions use V8), whereas the tools use Golang - and each of these has their own RegExp implementations, with slight variations in the accepted flags. eg, in addition to the normal g, i, m:

So this now feels like it deserves a DOCS ticket, rather than a "drive-by pull request".

@kay-kim
Copy link
Contributor

kay-kim commented Jun 29, 2019

Hey Kevin --
will close this. We do have a docs ticket https://jira.mongodb.org/browse/DOCS-11478 to update the page. Will see how to handle aforementioned issue when doing the ticket.

@kay-kim kay-kim closed this Jun 29, 2019
mongo-cr-bot pushed a commit that referenced this pull request Mar 15, 2023
* DOCS-15825 add migration concurrency to server status (#2453)

* DOCS-15825-add-migrationConcurrency-to-serverStatus

* DOCS-15825-add-migrationConcurrency-to-serverStatus

* DOCS-15825-add-migrationConcurrency-to-serverStatus

* DOCS-15825-add-migrationConcurrency-to-serverStatus

* DOCS-15825-add-migrationConcurrency-to-serverStatus

* DOCS-15825-add-migrationConcurrency-to-serverStatus

* DOCS-15825-add-migrationConcurrency-to-serverStatus

* DOCS-15825-add-migrationConcurrency-to-serverStatus

* DOCS-15825-add-migrationConcurrency-to-serverStatus

---------

Co-authored-by: jason-price-mongodb <[email protected]>

* DOCS-15825 add migration concurrency to server status

---------

Co-authored-by: jason-price-mongodb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants