QStringList.filter using RegExp
I get a list of tables from my database into a QStringList, I want to use QStringList's filter function to list all tables EXCEPT those that begin with "sqlite", how can I do this with filter, using RegExp?
Here's what I'm currently trying:
Code:
QStringList tables
= database.
tables(tableType
);
// tableType = QSql::Tables
When I do this, my ret_tables ends up completely blank.
So basically I want to know how to do a RegExp filter which will match everything except strings beginning with "sqlite".
Re: QStringList.filter using RegExp
"(?!sqlite).*" should work.
Re: QStringList.filter using RegExp
This seems to work, also:
Code:
StringList ret_tables
= tables.
filter(QRegExp("^(?!sqlite_)", Qt
::CaseInsensitive));
Thanks, spud.