var str='<script src="script1.js"><'+'/'+'script>'; alert(str.replace(/(script1\.js)/,'http:\\\\......$1'));