How can I execute this request in mongoC using bcon_new?
db.users.find({"name": /.*m.*/})
After several attempts and errors, I finally found an answer based on libbson analogies
bson_t *query; query = BCON_NEW ("name", BCON_REGEX("m","i") );
There is also a specialist for bson_append _...
bson_append_regex(&doc, "name", -1, ".*m.*", nullptr);
bson_append_regex(&doc, "name", -1, ".*m.*", nullptr); cursor = mongoc_collection_find(coll, MONGOC_QUERY_NONE, 0, 0, 0, &doc, nullptr, nullptr);