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

Top comments (0)

🌚 Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.