Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3988

should regex matching work with $pull? it doesn't.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.5.3
    • Affects Version/s: None
    • Component/s: Write Ops
    • Fully Compatible
    • ALL

      > t.find(

      {x:1}

      )

      { "_id" : ObjectId("4e8634b96c26412b2e1418b4"), "x" : 1, "y" : [ 2, 3, 4, "abc", "xyz" ] }

      >
      > t.update(

      {x:1}

      , {$pull:{y:3}})
      > t.find(

      {x:1}

      )

      { "_id" : ObjectId("4e8634b96c26412b2e1418b4"), "x" : 1, "y" : [ 2, 4, "abc", "xyz" ] }

      >
      > t.update(

      {x:1}

      , {$pull:{y:{$lt:3}}})
      > t.find(

      {x:1}

      )

      { "_id" : ObjectId("4e8634b96c26412b2e1418b4"), "x" : 1, "y" : [ 4, "abc", "xyz" ] }

      > t.update(

      {x:1}

      , {$pull:{y:/yz/}})
      > t.find(

      {x:1}

      )

      { "_id" : ObjectId("4e8634b96c26412b2e1418b4"), "x" : 1, "y" : [ 4, "abc", "xyz" ] }

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            dwight@mongodb.com Dwight Merriman
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: