文字列を空白で区切り改行
全角記号…
by ethertank
HTML
<textarea id="input" cols="20" rows="5">
2
3 1 4 2 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1
A a C D ぁ ぃ ぅ ぇ ぉ ・...
CSS
body { background-color: #DDDDDD; }
textarea{display:block;}
JavaScript
var input = document.getElementById('input').value;
document.write('<hr />');
document.write( input.replace(/([0-9a-xA-Xぁ-んァ-ン\u3400-\u4DBF\u4E00-\u9FFF\uD840-\uD87F\uDC00-\uDFFF\uF900-\uFAFF]+)\s/g, '$1<br />') );