JAVASCRIPT 정규식으로 text에 있는 html 태그 제거하기 ckeditor로 작성한 문서를 tag만 제거하고 출력하고싶을때 ?? 정규식으로 태그만 제거하자! text = text.replace(/ /ig, "\n"); text = text.replace(/]*)?(\s)*(\/)?>/ig, ""); text = text.replace(/(]+)>)/gi, ""); text = text.replace(/ /gi,""); console.dir(text) return text; 출처 구글선생님들 🙇🏻♀️ WEB/JS 2020.08.06