Skip to content
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

Case-insensitive regex queries #445

Open
muety opened this issue May 13, 2021 · 0 comments
Open

Case-insensitive regex queries #445

muety opened this issue May 13, 2021 · 0 comments

Comments

@muety
Copy link

muety commented May 13, 2021

I might be doing something wrong here, but it looks like $regex queries can't be made case-insensitive. Consider the following example.

{
  "selector": {
    "title": {
      "$regexp": "Bar"
    }
}

Having a document with { "title": "Foo Bar Baz" }, the above query will succeed and return the document. However, I'd still like to find it if my regex was bar (lower case).

Using (?i)bar as a regex yield the following error:

Invalid regular expression: /(?i)bar/: Invalid group
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

No branches or pull requests

1 participant