Originally Posted by Xubera
if your gsub above removes a texture... like
|TTexturePath therjunk:morejunk|t
is what your trying to remove, just do a
text = text:gsub("\124T.*\124t", "")
that removes the |T and |t and everything in between
|
Careful there. You should use
text = text:gsub("\124T.-\124t", "")
instead to capture the smallest possible amount of text between |T and |t. This is because .* captures the longest possible amount of text and if the text contains 2 texture links, you will get rid of all the text between the 2 textures.