>./sqlite3 your.smatdb
sqlite> .load sqlite3-regex[.dll/.so] <
edited
sqlite> select MessageContent from smat_msgs where SMATREGEXP(”, rowid, ‘main’) > 0;
Substitute appropriately.
This will work only when your messages are in UTF8. If they are in some other encoding then there are few extra steps between .load and select