[SERVER-29117] $regex not returning the correct documents when using a escaped dot Created: 09/May/17 Updated: 03/Apr/23 Resolved: 10/May/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.5.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dennis Hoefakker | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Steps To Reproduce: | When using : { email : { $regex : "bob\.lastname", $options : "i"}} it returns the document (which is ok) |
| Participants: |
| Description |
|
I have a document where i store a email adres, on insert of a new document i want to check if the email adres is already in use. See the document below with a simple (yes i know not ok) email, i just want 1 dot to simplify I use a $regex to search if there are already documents present with the email. i escape the "special" dot so it's handled like a literal. |
| Comments |
| Comment by Kelsey Schubert [ 10/May/17 ] |
|
Hi HoefMeistert, Thanks for the update; I'm closing this ticket per your request. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this would be best posted on the mongodb-users group. Kind regards, |
| Comment by Dennis Hoefakker [ 10/May/17 ] |
|
Please close this issue, i think it was late :S... Totally forgot to add the ^ and $... b\.lastname is correct, cause it matches --b.lastname :S Sorry for the inconvenience |