Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-745

com.mongodb.util.JSON.parse() fails to correctly parse single backslash string

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.10.1
    • Component/s: None
    • Labels:
      None

      My test program outputs:

      str print { "timestamp" : { "$regex" : "/\w/"}}
      JSON print { "timestamp" : { "$regex" : "/w/"}}    <= WRONG?
      str print { "timestamp" : { "$regex" : "/\ w/"}}
      JSON print { "timestamp" : { "$regex" : "/\\w/"}}  <= WRONG?
      str print { "timestamp" : { "$regex" : "/\\w/"}}
      JSON print { "timestamp" : { "$regex" : "/\\w/"}}  <= OK
      str print { "timestamp" : { "$regex" : "/\\ w/"}}
      JSON print { "timestamp" : { "$regex" : "/\\ w/"}} <= OK
      

      See https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/fsrhBwN1SXs for more detail.

            Assignee:
            Unassigned Unassigned
            Reporter:
            stephen.lee Stephen Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: