Ok you have given a good example the only problem i still dont understand the forumla your using and whats up with the commands in between
was that a method of creating a loop in the $regsubex for the text or something
Or ??
Yes I know I dont make sense lol this $regxxxxxxxxx commands are mind boggling when your new to them.
$regsubex($1,/\b(lol|lmf?ao|haha|brb|wb|yw|ty)\b/gi,$(%\1text,2))
$1- is the data sent to the variable. The \b on either side check for spaces. No spaces no match. (text|moretext|othertext) means either text moretext or othertext in that spot works for a match. /gi are regex arguments. g means to repeat for all on the line. So a loop in a way. Not sure what i does. $(%\1text,2) combines the text that was a match to get the variable. So if moretext was a match it'd come out as %moretexttext and to the user it'd come out was what ever data the %moretexttext variable held.
If I understand it correctly anyway. Thanks jaytea. This is going to be fun to play with. Now I gotta figure out if sleep or coding is more important tonight.
Couple questions. What does the / at the begining do?, what does the i do? and what does the ,2 do?