[jQuery] regexpr question i'm getting stupid
hello i want t maxe a regexp search in javascript with an variable te
var reg = new RegExp("/\b("+te+")\b/");
pos = node.data.toUpperCase().search(reg);
that was my oppinion but it don't works
my oppinion was that because
var reg = new RegExp(/\b(TEXT)\b/);
pos = node.data.toUpperCase().search(reg);
works but how can i replace TEXT with the variable te???
thanks for your replies