string <- "<params description=\"some desc\" bgcol=\"255;0;0\"/>"
lapply(strsplit(regmatches(string, regexec('bgcol="([^"]*)"', string))[[1]][2], ";"), as.integer)
lapply(strsplit(regmatches(string, regexpr('bgcol="\\K[^"]*', string, perl=TRUE)), ";"), as.integer)
