通过正则表达式的方式去除html标签
- select regexp_replace(content,'</?[^>]*>|nbsp;|&','') content from T_TEST_CONTENT_CONFIG t
- order by status_date desc;
原始clob内容:
<p><spanstyle="font-family:宋体;">【某某公司】您有一条XX尚未领取!使用</span><spanstyle="font-family: Calibri;">8G</span><spanstyle="font-family: 宋体;">套餐</span><spanstyle="font-family: Calibri;">18</span><spanstyle="font-family: 宋体;">元档可领取</span><spanstyle="font-family: Calibri;">50M</span><spanstyle="font-family: 宋体;">宽带,</span><span style="font-family:Calibri;">18</span><span style="font-family:宋体;">元档可领取</span><span style="font-family:Calibri;">10M</span><span style="font-family:宋体;">宽带</span><span style="font-family:Calibri;">+</span><span style="font-family:宋体;">电视机顶盒。更多优惠详询</span><span style="font-family:Calibri;">30012</span><span style="font-family:宋体;">或宽带预约电话</span><span style="font-family:Calibri;">158******</span><span style="font-family:宋体;">,咨询是否满足领取条件。</span><aname="_GoBack"></a></p><p> </p>
转换后:
【某某公司】您有一条XX尚未领取!使用8G套餐18元档可领取50M宽带,18元档可领取10M宽带+电视机顶盒。更多优惠详询30012或宽带预约电话158******,咨询是否满足领取条件。