s <- "xxx/yyy?utm_medium=display&utm_source=ogury&utm_campaign=TOTO&zzz=coco"sub(".*[&?]utm_campaign=([^&]+).*", "\\1", s)
Standard input is empty
[1] "TOTO"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!