Bình thường | toán tử hoạt động trên mongo.
Điều này nên làm:
BasicDBObject regexQuery = new BasicDBObject();
regexQuery.put("name",
new BasicDBObject("$regex", "ABC\\|DFG"));
Nếu thử trên mongo shell:
db.collection.find({name:/ABC|DFG/}).pretty()