1
我在使用C#驅動程序搜索mongodb集合中的字段時遇到了上述錯誤。C#mongodb解析「+」 - 量詞{x,y}什麼也沒有
下面的代碼,我正在此錯誤行:
IMongoQuery query = Query.Matches(field, BsonRegularExpression.Create(
new Regex(searchCri, RegexOptions.IgnoreCase)));
我試着用Regex.Replace(searchCri, "[~#%&*{}/<>?|\"-]+", "")
但它並沒有解決我的問題更換searchCri
變量。
任何人都可以協助嗎?
偉大,感謝名單!完美的作品。 – JustLearning