Кареть с режимом

new RegExp("\\^","gi");
/* '\' is used as an escape character, so you first escape '^', then you
escape '\' itself */
Ugliest Unicorn