<commit_before>function processpaste (elem, savedcontent) {
   // pasteddata = elem.innerText;
    //^^Alternatively loop through dom (elem.childNodes or elem.getElementsByTagName) here
//alert(pasteddata);
 //   elem.innerText = savedcontent;

    // Do whatever with gathered data;
    var regex = /mpflag.*?(?=(mpflag|otherflag))/gm;
    var mp,result;
    var member="";
    var s="";
	s = elem.innerText;
	s = s.replace(/.*The SAS System.*|[0-9 ]{10}\+.*/g,"");
	s = s.replace(/\nMPRINT\([A-Z0-9_\.]+\):/g,"mpflag");
	s = s.replace(/\nMACROGEN|\nMLOGIC|\nNOTE|\nSYMBOLGEN:|\nWARNING|\nERROR|\n[0-9] \+ /g,"otherflag");
	s = s.replace(/(\r\n|\n|\r)/g,"");

    result = s.match(regex);
	if (result) {
		for (var i = 0; i < result.length; i++) {
        mp = result[i].replace("mpflag","");
         mp = mp.replace(/;[^;]*$/,"; \r\n<br/>");  
        member = member + mp ; 
		}
 //   w.value=member;  
	}
//	var oTable=document.getElementById("div"); 
//	oTable.innerText=strip(member);
//		oTable.innerText.replace("&gt;", ">");
//        oTable.innerText.replace("&lt;", "<");
//        oTable.innerText.replace("&nbsp;", " ");
//        oTable.innerText.replace("&amp;", "&");
//        oTable.innerText.replace("&quot;", "\"");
//        oTable.innerText.replace("'", "\'");
//        oTable.innerText.replace("<br/>", "\n");
// document.body.getElementById('div').value=member;
	document.body.innerText=strip(member);
    
} <commit_msg>bugfix remove code with leading numbers<commit_after>function processpaste (elem, savedcontent) {
    var regex = /mpflag.*?(?=(mpflag|otherflag))/gm;
    var mp,result;
    var member="";
    var s="";
	s = elem.innerText;
	s = s.replace(/.*The SAS System.*|[0-9 ]{10}\+.*/g,"");
	s = s.replace(/\nMPRINT\([A-Z0-9_\.]+\):/g,"mpflag");
	s = s.replace(/\nMACROGEN|\nMLOGIC|\nNOTE|\nSYMBOLGEN:|\nWARNING|\nERROR|\n[0-9]+ \+/g,"otherflag");
	s = s.replace(/(\r\n|\n|\r)/g," ");
    result = s.match(regex);
	if (result) {
		for (var i = 0; i < result.length; i++) {
        mp = result[i].replace("mpflag","");
         mp = mp.replace(/;.*$/,"; \r\n<br/>");  
        member = member + mp ; 
		}
	}
	document.body.innerText=strip(member);
} 
{'fraction_non_alphanumeric': 0.2506861848124428, 'fraction_numerical': 0.008234217749313814, 'mean_word_length': 2.969147005444646, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5851946', 'n_tokens_mistral': 858, 'n_tokens_neox': 826, 'n_words': 130}