programing

모두 제거모두 제거쿼리가 있는 태그

iphone6s 2023. 6. 21. 22:25
반응형

모두 제거
쿼리가 있는 태그

모두 제거합니다.<div>내용의 태그, 이 쿼리를 사용하고 제거만 합니다.<div>클래스가 없는 태그, 모두 제거하는 방법<div>,<div class"example">,</div>?

UPDATE wp_posts SET `post_content` = REPLACE (`post_content`, '<div>', '') WHERE `ID`=84259

제거하는 쿼리를 원합니다.<%div%>(%는 div 전후가 중요하지 않음을 의미함)

사용할 수 있습니다.REGEXP_REPLACE:

update wp_posts
set post_content = REGEXP_REPLACE(post_content, '</?div.*?>', '');

피들

언급URL : https://stackoverflow.com/questions/71124744/remove-all-div-tags-with-a-query

반응형