# reEscape
# Description
匹配符合规范的字符串
e.g
<%-reg%>
# Return
regExp
# Code
const reEscape = /<%-([\s\S]+?)%>/g
# Analyze
就是返回了一个符合规范的正则表达式,主要是匹配 \s 和 \S
← parent reEvaluate →
匹配符合规范的字符串
e.g
<%-reg%>
regExp
const reEscape = /<%-([\s\S]+?)%>/g
就是返回了一个符合规范的正则表达式,主要是匹配 \s 和 \S
← parent reEvaluate →