Method Matches
Matches(string, BsonRegularExpression)
Tests that the value of the named element matches a regular expression (see $regex).
public static IMongoQuery Matches(string name, BsonRegularExpression regex)
Parameters
namestringThe name of the element to test.
regexBsonRegularExpressionThe regex.
Returns
- IMongoQuery
An IMongoQuery.