Index: library/mongodb/tests/nx-mongo.test =================================================================== diff -u -N -rab21c8502870e715c567c657146283699e31b01b -r788f2f577d21a28e0d6a05ca87562a507d929527 --- library/mongodb/tests/nx-mongo.test (.../nx-mongo.test) (revision ab21c8502870e715c567c657146283699e31b01b) +++ library/mongodb/tests/nx-mongo.test (.../nx-mongo.test) (revision 788f2f577d21a28e0d6a05ca87562a507d929527) @@ -115,6 +115,9 @@ ? {llength [set persons [Person find all -cond {age > 30}]]} 1 ? {lsort [lmap p $persons {$p cget -name}]} "Gustaf" +puts "\nFind persons with names matching regular expression /an/i (containing 'an', ignore case):" +? {llength [set persons [Person find all -cond {name ~ {an i}}]]} 2 +? {lsort [lmap p $persons {$p cget -name}]} "Franz Stefan" # # Define a special find method for "Person" named "oldies" by @@ -124,6 +127,7 @@ return [:find all -cond {age > 30}] } + # # Use the special find method #