js使用正则表达式匹配富文本框中的img标签

var data = [];
var str = [];
this.content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/g, function (match, capture) {
   data.push(capture);
   str.push(match);
});
console.log(data);
console.log(str);

原文地址:https://www.cnblogs.com/tlfe/p/12786527.html