Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
提取这一段富文本的图片路径
code_text
举例:
// 定义变量存储图片地址 var urls = [] // 富文本 var content = '<p>标题,内容xxxxxx <img src="http://xxx.jpg"></p>' // 正则遍历匹配 content .replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/g, function(match, capture) { urls.push(capture) }) // 输出提取结果 console.log(urls)