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

regex example missing curly brace

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 01112017-cleanup
    • Component/s: manual
    • Labels:
      None
    • Last comment by Customer:
      true

      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

            Assignee:
            sam.kleinman Sam Kleinman (Inactive)
            Reporter:
            thomas.boyd Thomas Boyd
            Participants:
            Last commenter:
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              8 years, 17 weeks, 2 days ago
              Date of 1st Reply: