ho creato questo script in javascript...

codice:
function copia(formname,elemento) {
	var testo = escape(document.frames("Composition").document.body.innerHTML);
	testo = testo.replace(/href=\"?\"/gi,"href=\"#\"");
	testo = unescape(testo);
	testo = testo.replace(/
/gi,\'\');
	var str = "document."+formname+"."+elemento+".value = \'"+testo+"\';" ;
	eval(str);
}
ma la funzione testo = testo.replace(/href=\"?\"/gi,"href=\"#\""); è sbagliata..... come faccio a sostituire tutti i link con il # ????