local v = "something in here {uid} {uid2}" res, _ = v:gsub("{([^{}]*)}", ":id") print(res)