driver-core/src/main/com/mongodb/client/model/Filters.java
public static Bson regex(final String fieldName, final String pattern, @Nullable final String options) {
        notNull("pattern", pattern);
        return new SimpleFilter(fieldName, new BsonRegularExpression(pattern, options));
    }
public static Bson regex(final String fieldName, final String pattern, @Nullable final String options) {
        notNull("pattern", pattern);
        return new SimpleFilter(fieldName, new BsonRegularExpression(pattern, options));
    }
Creates a filter that matches all documents where the value of the field matches the given regular expression pattern with the given
options applied.

@param fieldName the field name
@param pattern   the pattern
@param options   the options
@return the filter
@mongodb.driver.manual reference/operator/query/regex $regex