fork download
  1. x <- c("1128=9,9=282,35=X,34=4846318,52=20140107224500037,34=20140107,268=3,279=0,22=8,48=637548,83=585590,107=ZCH4,269=4,270=425,273=224500000,286=5,279=0,22=8,48=637548,83=585591,107=ZCH4,269=E,273=425.5,273=224500000,279=0,273=8,48=637548,34=585592,107=ZCH4,269=F,270=425,271=100,273=224500000,10=144",
  2. "1128=9,9=467,35=X,34=4846344,52=20140107224500107,75=20140108,268=5,279=0,22=8,48=772825,279=0,22=8,48=692825,83=434250,107=ZCZ4,269=E,270=453,271=41,273=224500000,279=0,22=8,48=692007,83=434251,107=ZCZ4,269=F,270=452.75,273=224500000,279=0,22=8,48=35213,83=434252274=2,336=0,451=0.25,279=1,22=8,48=692825,83=434253,107=ZCZ4,269=1,270=453,271=51,273=224500000,336=0,346=17,1023=1,10=239")
  3. m <- regmatches(x, gregexpr("(?<=,|^)(?:48|34)=[^,]*", x, perl=TRUE))
  4. sapply(m, function(x) paste(x, collapse=","))
Success #stdin #stdout 0.16s 178496KB
stdin
Standard input is empty
stdout
[1] "34=4846318,34=20140107,48=637548,48=637548,48=637548,34=585592"
[2] "34=4846344,48=772825,48=692825,48=692007,48=35213,48=692825"