Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将这些表达式合二为一
string.match(/<%[a-z]+%>/g, 'value') string.match(/<%[a-z]+%>/g, 'value')
如果要检索两个表达式的匹配项,可以这样做:
/(<%[a-z]+%>|<%[a-z]+%>)/g