Thread Tools Display Modes
07-01-10, 02:35 PM   #1
Soulofsin_007
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 125
Finding a word

I basically want to find a word in a sentence, and replace what was said with something else. Sorta like the tutorial on the wiki about hooking the chatentry but I'm not 100% sure on how to find that word in the sentence.
  Reply With Quote
07-01-10, 03:34 PM   #2
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
Code:
string.gsub(source, find, replace)
  Reply With Quote
07-01-10, 03:38 PM   #3
Soulofsin_007
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 125
Thanks I'll try that.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Finding a word


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