Thread Tools Display Modes
Prev Previous Post   Next Post Next
04/19/14, 01:56 AM   #1
gumphrey
Join Date: Apr 2014
Posts: 5
Problems with string.gsub

I am trying to get plain text out of chat messages. I want to strip all the color codes, link information, etc. just leaving a plain text version of the message. Is there an existing method exposed that can do that?

I have been experimenting with using string.gsub to remove the text, but it doesn't work except for very simple patterns. For instance, in stand alone lua I can use this pattern to find item links and replace them with just plain text in square brackets. In my addon, it does nothing...

local textOut = string.gsub(textIn, 'H.-h(%[.-%])h', '%1')
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » Problems with string.gsub


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off