[DOCS-16050] Document usage of regular expressions in Go Driver documentation Created: 19/Apr/23 Updated: 19/Apr/23 Resolved: 19/Apr/23 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | drivers |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Alexander Ignatyev | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Days since reply: | 42 weeks ago | ||||||||
| Description |
|
The use of regexes in Go Driver is neither obvious nor well documented. In the driver package docs no regexes mentioned at all, at least I didn't find: https://pkg.go.dev/go.mongodb.org/mongo-driver@v1.11.2 As a result people trying to creates reges something like:
And it does not work, the correct code should be
After some research I managed to find this page https://pkg.go.dev/go.mongodb.org/mongo-driver@v1.11.2/bson/primitive#Regex I believe at least one example of using regexes should be added to the driver package's docs: https://pkg.go.dev/go.mongodb.org/mongo-driver@v1.11.2 Since it is not obvious how to do it. And the link to "primitives" package from the driver package should be easily accessible.
A/C:
|