Hi all

Im having a little problem with a regular expressions. Here is the code

Code:
  var pattern = new RegExp("(^|\s)match_me(\s|$)");

  if(pattern.test("match_me something_else"))
    alert('match');
  else
    alert('no match');
I cant figure out why this doesn't work, well to my understanding this should work...
Iv also tried

Code:
  var pattern = new RegExp("(^|\s|\b)match_me(\b|\s|$)");
And it also doesn't work.

Can anyone help?
Thanks in advance