text = "A;BB;C[1;22];DDD[11;2;33];EEEEE[1111]"puts text.scan(/(?:\[[^\]\[]*\]|[^;])+/)
Standard input is empty
A BB C[1;22] DDD[11;2;33] EEEEE[1111]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!