Answers for "regex find img tag"

0

regex find img tag

const sources = html.match(/<img [^>]*src="[^"]*"[^>]*>/gm)
                          .map(x => x.replace(/.*src="([^"]*)".*/, '$1'));
Posted by: Guest on April-27-2021

Browse Popular Code Answers by Language