Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-206

using mongo-c-driver can not use regular expressions containing forward slash (/)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.90.0
    • Affects Version/s: 0.7
    • Component/s: None
    • Environment:
      Redhat linux

      I am trying to use the C-API for mongo DB. I want to find records with a name matching a regular expression containing slashes . If I run the mongo command line I get 40 results for the query:
      db.test_006.find(

      {'name':/^\/TEST::TOP:NEWSTAT\/_data_[0-9]*/}

      )
      which is correct. When I try to code this in C I can not get it to match.
      using:
      bson_append_regex( &query, "name","/TEST::TOP:NEWSTAT/" , "" )
      I find all the records and more.
      All combinations of
      / or even [/] or \\/ do not find any records. I also tried
      x2F.

            Assignee:
            christian.hergert@10gen.com Christian Hergert
            Reporter:
            josh.stillerman@gmail.com Joshua Stillerman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: