var reg = "hello"
collection.Find(ctx, bson.D{{Key: "keyword", Value: primitive.Regex{Pattern: reg, Options: ""}}})
Pattern内填写不携带斜杠的内容
2023-02-01
var reg = "hello"
collection.Find(ctx, bson.D{{Key: "keyword", Value: primitive.Regex{Pattern: reg, Options: ""}}})
Pattern内填写不携带斜杠的内容