Oops, sorry about the confusion regarding the built-in REGEXP. That's kind of disappointing. It would appear that the user-defined regexp function in the original post should work assuming the SQL and regex syntax errors are corrected.
However, there *is* a GLOB built-in to SQLite 3 that has a default registered implementation (though it can be overriden by a user-defined "glob" method if necessary). -- http://mail.python.org/mailman/listinfo/python-list