[DOCS-5740] Comment on: "manual/search.txt" for \\Q Created: 29/Jun/15 Updated: 03/Nov/17 Resolved: 29/Jun/15 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 01112017-cleanup |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Docs Collector User (Inactive) | Assignee: | Allison Reinheimer Moore |
| Resolution: | Done | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Location: https://docs.mongodb.org/manual/search/?query=%22%5CQ%22 |
||
| Participants: | |
| Days since reply: | 8 years, 33 weeks, 2 days ago |
| Description |
|
I'm trying to search some info about what \Q and \E means in a $regex search, but I can't find information about it in the documentation. Regards |
| Comments |
| Comment by Allison Reinheimer Moore [ 29/Jun/15 ] |
|
Covering regular expressions as a whole is, unfortunately, out of the scope of our documentation. I'd suggest stackoverflow as a great place to find the answers to these kinds of questions. Thanks! |
| Comment by Allison Reinheimer Moore [ 29/Jun/15 ] |
|
In many flavors of regex, including the one MongoDB uses, you can use \Q .. \E to escape the characters bracketed by the \Q and \E. \Q marks the beginning of the escaped quote, while \E the end. This may provide some guidance: http://www.regular-expressions.info/characters.html (under Special Characters, it discusses the \Q .. \E escape sequence). |