Here is my example http://jsfiddle.net/mwDCV/1/
Using http://gskinner.com/RegExr/ i get exactly what i want however in javascript i do not
pattern
pass(word)?\=\s*(\<[^>]+\>)*\s*([^<]+)
aka
var myRe = new RegExp('pass(word)?\=\s*(\<[^>]+\>)*\s*([^<]+)', 'gim');
text
<br />
Run
password=
<br />
test
<br />
You use the RegExp constructor which takes a string, so your backslashes were string escapes. Use the regexp literal instead, as in the other answer. 🙂