Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1795

regex example missing curly brace

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Trivial - P5 Trivial - P5
    • 01112017-cleanup
    • None
    • manual
    • None

    Description

      On the page http://docs.mongodb.org/manual/reference/operator/regex/

      the following example:

      db.collection.find( { field:

      { $regex: /acme.*corp/i, $nin: [ 'acmeblahcorp' ] }

      );

      Needs an extra curly brace:

      db.collection.find( { field: { $regex: /acme.*corp/i, $nin: [ 'acmeblahcorp' ] }} );

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            thomas.boyd Thomas Boyd
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 26 weeks, 6 days ago