?<名字>
let str = '<a href="https://baidu.com">112</a>' const reg = /<a href="(?<url>.*)">(?<text>.*)<\/a>/ const result = reg.exect(str)
dotAll:.*?匹配空白字符,正则后面加个s,gs为全部匹配
.*?
const reg = /<li>.*?<a>(.*?)<\/a>.*?<p>(.*?)<\/p>/gs
← ES8 ES10→