[JAVA-745] com.mongodb.util.JSON.parse() fails to correctly parse single backslash string Created: 25/Jan/13  Updated: 25/Jan/13  Resolved: 25/Jan/13

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: 2.10.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Stephen Lee Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File Test.java    

 Description   

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.



 Comments   
Comment by Jeffrey Yemin [ 25/Jan/13 ]

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

Generated at Thu Feb 08 08:52:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.