Is there a way to execute a SQL statement in SQLite to remove all the html from a TEXT field?
+1
A:
No. HTML is not parseable by regex, not if you want to be sure about the result.
But you could create an SQLite linked C/C++ application and register a function (http://sqlite.org/c3ref/create_function.html) that does your sanitizing.
Then it's just a matter of issuing update your_table set text = sanitize(text)
.
The sanitize() function should build the DOM tree and grab the TEXT information.
Pasi Savolainen
2010-04-01 00:05:09