#include <algorithm>
#include <iostream>
#include <iterator>
#include <sstream>
#include <array>

int main() {
	std::string test = "[1:2:3:4]cd/dvd  PLDS  DVD-RW DU8A6SH DU53  /dev/sr0";

	std::array<int,4> v;
	char c;
	std::stringstream ss(test);
	ss >> c >> v[0] >> c >> v[1] >> c >> v[2] >> c >> v[3] >> c;

	copy(begin(v), end(v), std::ostream_iterator<int>(std::cout, ", "));
	std::cout << "\n";
	
	return 0;
}