SQLite3 already has a REGEXP function, so you don't need to create your own.
As Dan mentioned you also have a problem in your expression: 'aa.[0-9]) You need a closing quote on the expression, and you need to match the close paren with an open paren, or remove it. Also, in case you weren't aware, there will be a "sqlite3" module in Python 2.5 based on pysqlite 2.2: http://initd.org/tracker/pysqlite Using pysqlite will make it easier to move to the Python 2.5 sqlite3 module if that's important to you. -- Matt Good -- http://mail.python.org/mailman/listinfo/python-list