[2020-02-14]

전민승·2021년 2월 14일
0
const originalString = `<p>하하</p>`;

const strippedString = originalString.replace(/(<([^>]+)>)/gi, "");

console.log(strippedString);

결과: '하하'

정규식을 사용하여 html을 markdown으로 converting 하기!

profile
Frontend Developer

0개의 댓글