// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Splitting {
    public static void main(String[] args) {
        String s = "en_20080722_al_jazirah_018124500030";
        Pattern p = Pattern.compile("(\\w{2})_(\\d{8})_(\\w+)_(\\d+)");
        Matcher m = p.matcher(s);
        while(m.find()) {
            System.out.println(m.group(1));
            System.out.println(m.group(2));
            System.out.println(m.group(3));
            System.out.println(m.group(4));
        }
        String[] parts = s.split("((?<=^\\w{2})_)|((?<=^\\w{2}_\\d{8})_)|(_(?=\\d+$))");
        for(int i = 0; i < parts.length; i++) {
            System.out.println(parts[i]);
        }
    }
}
