Sergey_New,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<textarea name="">
0 HEAD
1 SOUR AGES
2 VERS 2.0.4
</textarea>
<script>
var a = document.querySelector("textarea").value, k = [];
a = a.match(/^(\S+)(\s\S+)+?$/gim)
a = a.map(function(a) {
return a.split(/\s+/)
});
alert(JSON.stringify(a))
</script>
</body>
</html>