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

XMLWordPrintableJSON

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

      > 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 (Inactive)
            Reporter:
            Dwight Merriman
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: