mysql去除字段的html标签
使用mysql的REGEXP_REPLACE这个内置函数对已有的字段中存在的html标签数据进行清洗 如下示例: REGEXP_REPLACE(REGEXP_REPLACE(d.label_info,' ',''), '<[^>]+>', '')
处理前数据:
<p style="margin-left: 0;text-indent: 0"><strong>1、</strong><strong><span style=";font-family:宋体">硕士;</span></strong></p><p style="margin-left: 0;text-indent: 0"><strong>2、</strong><strong><span style=";font-family:宋体">发酵技术、预防兽医、生物技术、生物工程、药物制剂、制药工程等相关专业;</span></strong></p><p><strong><span style="font-size:14px;font-family:宋体">3、有相关工作经验,优秀应届生均可。</span></strong></p><p><br/></p>
处理后的数据:
1、硕士;2、发酵技术、预防兽医、生物技术、生物工程、药物制剂、制药工程等相关专业;3、有相关工作经验,优秀应届生均可。