js正则表达式匹配闭合标签
let htmlStr = fs.readFileSync(__dirname + '/data.xml', 'utf8')
htmlStr = htmlStr
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"')
.replace(/\n/g, '')
let itemArr = []
htmlStr.replace(/<item(([\s\S])*?)<\/item>/g, (word) => {
console.log(word)
itemArr.push(word)
return word
})