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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > 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.

              Assignee:
              DO NOT USE - Backlog - Platform Team
              Reporter:
              Dan Dascalescu
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: