-- this really ought to be in a library somewhere local function SplitLink(link) local _,_, color, item, name = string.find(link, "|c(%x+)|Hitem:([\-%d:]+)|h%[(.-)%]|h|r"); return color, item, name; end