dima85,
<textarea id="k" name="" rows="12" >
text t55ext
text gd6!333 43
id 395
text text
text gd!333 43
id 34355
text te>xt = 34
text= <44
id 45346
</textarea>
<script>
var line = "45346", reg = new RegExp("([\\s\\S]+?)(id\\s+\\d+)", "mig");
k.value = k.value.replace(reg, function(a,b,c) {
return new RegExp("^id+\\s+"+line+"$").test(c) ? "" : a
})
</script>