DEV Community

Cover image for Convert HTML to Text in Mysql SELECT
Paulo Mota
Paulo Mota

Posted on

Convert HTML to Text in Mysql SELECT

It is very simple just include your field on this regex expression on your select query:
SELECT content,REGEXP_REPLACE (content, '<.+?>', '') as new_text_column FROM entity_news en limit 10;
Query Example
I really recommend DBever for manage mysql databases.

https://dbeaver.io/

Good Hacking

Oldest comments (0)