Here is my problem:
Code: Select all
--numbers
result = string.gsub(result,"%f[%d%a]%d+%f[%c%p%s]","[color=255,128,0]%1[/color]")
--strings
result = string.gsub(result,"\"[%a%d%s%p]+\"","[color=64,64,64]%1[/color]")edit: i'm now using this piece of madness:
Code: Select all
abc983=-1
result = string.gsub(result,"\"",function(input)
abc983=abc983+1
if abc983%2==0 then
return "quotationopen_"..math.floor(abc983/2).."_983"
else
return "quotationclose_"..math.floor(abc983/2).."_983"
end
end)
for i=0, abc983/2 do
result = string.gsub(result,"quotationopen_"..i.."_983[%a%d%s%p]+quotationclose_"..i.."_983","[color=64,64,64]%1[/color]")
result = string.gsub(result,"quotationopen_"..i.."_983","\"")
result = string.gsub(result,"quotationclose_"..i.."_983","\"")
end