<script> var source='4#SW#Иван Петров#8#0#1#1 5#DM#Дмитрий Степанов#8#9#2#1 13#SW#Роман Хмурый#10#0#3#1'; document.write(source.split(/\s(?=\d)/).join('<br>')) </script>