Index: library/mongodb/nx-mongo.tcl =================================================================== diff -u -r4028b984af21ce2b0232ed8cb46572dc8336c76b -r788f2f577d21a28e0d6a05ca87562a507d929527 --- library/mongodb/nx-mongo.tcl (.../nx-mongo.tcl) (revision 4028b984af21ce2b0232ed8cb46572dc8336c76b) +++ library/mongodb/nx-mongo.tcl (.../nx-mongo.tcl) (revision 788f2f577d21a28e0d6a05ca87562a507d929527) @@ -454,6 +454,11 @@ "in" - "all" { lappend bson $att document [list [:get relop $op] {*}[$slot bson encode -array $value]] } + "~" { + # value should be a two-element list contain pattern and options + lappend bson $att document [list {$regex} regex $value] + } + default {return -code error "unknown operator $op"} } }