I am new to JavaScript, so this might be naive. Why does
/sel\(linux\)\:.*/gi.test("sel(linux): foo")
matches, but
new RegExp("sel\(linux\)\:.*", "gi").test("sel(linux): foo")
does not?