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

Escaping of parentheses/brackets/braces in shell regular expression literals does not work

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Shell
    • None
    • ALL

    Description

      > db.foo.find({name: /\\/}).count();
      0  // great, no records contain backslash
      > db.foo.find({name: /\(/}).count();
      ... }
      SyntaxError: Unexpected token }

      Same for [ and {{{}}*

      • That was an attempt to highlight {. I hate Jira's weird syntax when everyone else uses Markdown.

      Attachments

        Activity

          People

            backlog-server-platform DO NOT USE - Backlog - Platform Team
            dandv Dan Dascalescu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: