quote:
Originally posted by Mattike
code:
var reQuestion = /(^|\s)question(\s|$)/si;
I think you mean the following expression....
code:
var reQuestion = /\bquestion\b/i;
\b just denotes the end of a word (beginning or end), if you were to have the lines of a commar or questionmark after the word "question" then yours wouldn't fire. Also the s modifier doesn't exist in JScript