更新时间:2023-02-23 17:48:18
REGEX 是要走的路.
REGEX is the way to go.
{{ *form *| *(S+) *}}
应该可以很好地解决问题.
should do the trick nicely.
稍微解释一下:
{
和 }
将分别匹配 {
和 }
.*
将匹配 0 到无限空格字符 (
).(S+)
将匹配 1 到无限个非空格字符(a, B, 3, _ etc
).{
and }
will each match {
and }
respectively.*
will match for 0 to infinite space characters (
).(S+)
will match for 1 to infinite non-space characters (a, B, 3, _ etc
).