l例如匹配数据中包含 ${ 开头 ,}$ 结尾的正则表达式
只要在数据中存在${ }$,无论 ${ 前面有没有数据,}$ 后面有没有数据,或者${ 中间 }$,中间是什么,都会匹配到
案例:const rex = /(\$\{)[\s\S]*(\}\$)/g;
const a ='xxxxxxxwerh34567bvfd345yuuhgf';
const b = 'xvcdfg${xxxxxxx}$s23456ygfd';
rex.test(a) //false
rex.test(a) //true
延伸 [\s\S]* 任何字符无论多少个