08/06/06 00:15:56 od65JnXx
>>44
前スレ818のが、既にあるよ。
<html><head>
<script language="Javascript">
function fc(){var s,i,a,v,r;a=new Array();r=new RegExp("^ID:[A-Za-z0-9/\+]{7}.+$");
document.f1.dst.value="";document.f1.regex.value="";s=document.f1.src.value.split("\n");
for(i=0;i<s.length;i++){v=s[i].replace(/^[ ]+/,"");if(v.match(r)){v=v.substr(0,10);
if (!(v in a)){a[v]=1;document.f1.dst.value+=v+"\n";
v=v.replace("ID:","").replace("+","\\+");document.f1.regex.value+=v+"|"}}}alert("終");}
</script></head>
<body><form name=f1><textarea name=src cols=60>入力</textarea><br>
<input type=button value=変 onClick=fc()><br><textarea name=dst readonly></textarea><br>
<input type=text name=regex readonly></form></body></html>