更新时间:2022-05-20 22:38:50
使用
"/{{(.*?)}}/"
表达式 ".*"
是贪婪的,取尽可能多的字符.如果您使用 ".*?"
则需要尽可能少的字符,即它停在第一组右括号处.
The expression ".*"
is greedy, taking as many characters as possible.
If you use ".*?"
is takes as little characters as possible, that is it stops at the first set of closing brackets.