driver-core/src/main/com/mongodb/client/model/Filters.java
public static Bson regex(final String fieldName, final String pattern) {
        return regex(fieldName, pattern, null);
    }
public static Bson regex(final String fieldName, final String pattern) {
        return regex(fieldName, pattern, null);
    }
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
@return the filter
@mongodb.driver.manual reference/operator/query/regex $regex