Hi ddrukik,
First of all, thank you very much for the code. It works.
Question: If I have a value, consisting of these 3 words "in", "is" and "also", which are dynamically coming from the database and currenly populated in a hidden field "MyNoiseWords" as "in|is|also".
How do I dynamically pass the value of these 3 words into the definition of the reg exp?
I've tried using the RegExp constructor as:
var re = new RegExp("/(?!(?:"+MyNoiseWords.value+"))\b[a-zA-Z_]+\b/g"); // Trying to accomplish this: var re = /(?!(?:in|is|also))\b[a-zA-Z_]+\b/g;
but it doesn't work and keeps giving me an error.
How do I fix this?
Thanks a bunch in advance again!