[jQuery] Regular Expression that works everywhere but in jQuery

[jQuery] Regular Expression that works everywhere but in jQuery


Hey there,
I'm trying to use JS to clean up the cruft from a Word doc when it's
being pasted into a WYSYWIG editor.
Word puts conditional comments like this in the HTML:
<!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:*
{behavior:url(#default#VML);} w\:* {behavior:url
(#default#VML);} .shape {behavior:url(#default#VML);} </style> <!
[endif]-->
And I'm using this RegEx (I'm no RegEx-pert, but I've successfully
tested it here (http://www.regular-expressions.info/
javascriptexample.html), with the Firefox RegEx add-on, etc.):
//strip out word cruft
var scrubbed = code.html().replace(/(<!--).*(-->)/gi,"");
But it's not working at all. See something I'm missing/stupid I did?
Thanks!
Adam