// 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.Arrays;

public class SplitParseSum {
    public static void main(String[] args) {
        String s = "abc_120_xyz_10_20"; 
        System.out.println(Arrays.stream(s.split("[^\\d]")).filter(v -> v.length() > 0).mapToInt(v -> Integer.parseInt(v)).sum());
    }
}
