Perl, Ruby and some other languages support a similar 'extended' RegEx syntax which allows comments and disregards whitespace (in Ruby, you use the 'x' flag on a Regexp literal).
For those using plain JavaScript -- or wanting to do a one-off conversion -- I wrote a simple JS function that converts an extended RegEx to a plain one:
http://blog.mackerron.com/2010/08/08/extended-multi-line-js-...