I have firefox here and IE 6 but it works ok here, no need to escape the < character. Maybe you need more instances of <script to be replaced, to do that make the regexp global (g)
alert('<script\n<script\n'.replace(/<script/i,"hallo"));
alert('<script\n<script\n'.replace(/<script/ig,"hallo"))...