local v2 = "something in here {u{i{d}}} {uid2}" res2, _ = v2:gsub("%b{}", ":id") print(res2)