更新时间:2023-11-28 19:52:40
由于 Lua 中没有通常的 词边界,你可以利用一个 前沿模式
%f
.%f[%a]
匹配一个字母的转换,%f[%A]
匹配相反的转换.
Since there is no usual word boundary in Lua, you can make use of a frontier pattern
%f
. %f[%a]
matches a transition to a letter and %f[%A]
matches the opposite transition.
%f[set]
,一种前沿模式;这样的项目在任何位置匹配一个空字符串,使得下一个字符属于集合而前一个字符不属于集合.集合集的解释如前所述.主题的开头和结尾被当作字符