end-of-string anchor matches null character in regex

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.6.10
    • Component/s: Querying
    • None
    • ALL
    • Hide

      db.test.insert(

      { _id : 'test\0' }

      );
      db.test.find(

      { _id: /^test$/ }

      );

      Show
      db.test.insert( { _id : 'test\0' } ); db.test.find( { _id: /^test$/ } );
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The end-of-string anchor ($) matches a null character where it shouldn't.

              Assignee:
              Unassigned
              Reporter:
              Martijn Otto
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: