Me alegra que te sirva. Igualmente, no bien pueda intentaré mejorarlo

Edito: Aquí esta una versión algo mejorada:
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
<script>
campo='ejemplo';
String.prototype.substr_count = function()
{
var search = arguments[0];
var count = 0;
var pos = this.indexOf(search);
while ( pos != -1 ) {
count++;
pos = this.indexOf(search,pos+1);
}
return count;
}
function quitarenlace(){
var input = document.getElementById(campo);
var patern= /^\s*<a\b[^>]*>(.*?)<\/a>\s*$/;
if(typeof document.selection != 'undefined' && document.selection) {
var str = document.selection.createRange().text;
input.focus();
var sel = document.selection.createRange();
if(!patern.test(sel.text) || sel.text.substr_count('</a>')>1 || sel.text.substr_count('<a')>1){throw 'error al seleccionar el enlace';return;}
sel.text = sel.text.split('>')[1].split('<')[0];
sel.select();
return;
}else if(typeof input.selectionStart != 'undefined'){
if(typeof input.scrollTop != 'undefined'){
var st=input.scrollTop;
var sl=input.scrollTop;
}
var start = input.selectionStart;
var end = input.selectionEnd;
var insText = input.value.substring(start, end);
if(!patern.test(insText)|| insText.substr_count('</a>')>1 || insText.substr_count('<a')>1){throw 'error al seleccionar el enlace';return;}
insText=insText.split('>')[1].split('<')[0];
input.value = input.value.substr(0, start) +insText+ input.value.substr(end);
input.focus();
if(typeof input.scrollTop != 'undefined'){
input.scrollTop=st;
input.scrollTop=sl;
}
return;
}else{
return;
}
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<textarea name="ejemplo" cols="60" rows="5" id="ejemplo">otra cosa <a href="http://www.google.com">lo que sea </a> otra cosaotra cosa <a href="http://www.google.com">lo que sea </a> otra cosa</textarea>
<input type="button" name="Submit" value="quitar enlace" onclick="try{quitarenlace();}catch(e){alert(e)}" />
</form>
</body>
</html>