quote:
Originally posted by markee
Why use such a complex regular expression when you can do the same by this.
code:
var nMessage = Message.replace(/teh/gi, "the");
This will do exactly the same thing as what your regular expression did except it is smaller and less confusing for those that are new to regular expressions.
the point is i want to replace ONLY words not every occurance of "teh", as in other words, the spelling might be correct....
i thought \w was supposed to be used but since what Mattike gave me works i wont question his authority
now i need to make an array of the strings and corrections and a for loop.. i think