📜  正则表达式查找 img 标签 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:33.989000             🧑  作者: Mango

代码示例1
const sources = html.match(/]*src="[^"]*"[^>]*>/gm)
                          .map(x => x.replace(/.*src="([^"]*)".*/, '$1'));