Java: RegEx: Splitting a space-, comma-, and semi-colon separated list
// X+ = X, one or more times
// [\\s,;]+ = one or more times of either \s , or ;
1 2 String test_data = "hello world, this is a test, ;again"; 3 _logger.debug("Source: " + test_data); 4 5 for (String tag : test_data.split("[\\s,;]+")) 6 { 7 _logger.debug("Received tag: [" + tag + "]"); 8 }