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

allow regex word character (\w) and word boundary (\b) escapes to be unicode-aware

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • 3.0.11
    • Querying
    • None
    • Query Optimization

    Description

      Provide a way to use regular expressions in MongoDB where the word character (\w) and word boundary (\b) escapes work for code points greater than or equal to 256.

      Original description

      $regex word boundary fails by treating Danish ø character as a non-character

      db.collection.find({ "name" : { "$regex" : ".*\\bden\\b.*" , "$options" : "i"} })
      

      returns a document:

      {  "name": "Death Is A Caress(Døden Er Et Kjærtegn).sub" }
      

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            niccottrell Nic Cottrell (Personal)
            Votes:
            2 Vote for this issue
            Watchers:
            15 Start watching this issue

            Dates

              Created:
              Updated: