在Lua中可以使用string.match函数来实现字符串分割。你可以使用以下代码来获取你想要的结果:

local str = "http://192.168.200.200:80/version.xml"
local result = string.match(str, "http://([^/]+)")
print(result)

输出结果为:192.168.200.200:80

字符串http19216820020080versionxml 帮我简单的用用lua分割我想要结果19216820020080

原文地址: https://www.cveoy.top/t/topic/iH9Y 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录