简体   繁体   English

删除 MySql 中 <> 字符内的所有内容

[英]Remove everything inside <> characters in MySql

I have a massive column value that will have multiple html code, example:我有一个巨大的列值,其中包含多个 html 代码,例如:

</></>some wording</></></>some other stuff</></>

I want to query this but only search inside the "some wording" or "some other stuff" (Ignoring everything that is inside the brackets</>).我想查询这个但只在“一些措辞”或“其他一些东西”中搜索(忽略括号内的所有内容 </>)。

Any Idea how can I do this in MySql?知道如何在 MySql 中执行此操作吗?

Fixed using the suggested reg repl in the first Comment:修复了在第一条评论中使用建议的 reg repl:

REGEXP_REPLACE('the massive html code with bunch of tags','<.+?>', '') REGEXP_REPLACE('带有一堆标签的大量 html 代码','<.+?>', '')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM