lua string.match 匹配超链接

-- 匹配超链接
function M.HyperTextFormat(content)
    local content = 'https://cn.bing.com/search?q=%E5%A5%87%E8%91%A9%E7%9A%84%E5%9F%9F%E5%90%8D&form=ANNTH1&refig=c0da3f0f61ba48d9b626286a3a8005b9'
    local HyperText = string.match(content,'%a+%:%/%/%w[%w-]*[%.%w*]+%.?')

    return HyperText
end

 

posted @ 2021-11-01 10:36  奕心1999  阅读(476)  评论(0)    收藏  举报