【发布时间】:2015-04-24 04:58:37
【问题描述】:
所以我有以下代码在空格之间分割字符串:
text = "I am 'the text'"
for string in text:gmatch("%S+") do
print(string)
end
结果:
I
am
'the
text'
但我需要这样做:
I
am
the text --[[yep, without the quotes]]
我该怎么做?
编辑:只是为了补充这个问题,这个想法是将参数从一个程序传递到另一个程序。这是我正在处理的拉取请求,目前正在审查中:https://github.com/mpv-player/mpv/pull/1619
【问题讨论】:
标签: string lua lua-patterns