var html = `<table><tr><td>1</td><td>2</td></tr></table>` html .replace(/<td[^>]*>(.*?)<\/td>/g,'') image.png