Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Lua 中,如何将 123 与 11122333 的字符串匹配,并找到 1、2 和 3?有没有可以做到这一点的模式?而不是附加个别字符检查?
local str = '11122333' str = str:gsub('.','\0%0%0'):gsub('(.)%z%1',''):gsub('%z.','')