fork download
  1. s <- c("www.abcd.wsd/asd/asdcd/asrr/query=xyz","www.html.com/query=abcd","www.cmpnt.com/query=fgh/noquery=dd")
  2. sub("^.*/(query[^/]*).*$", "\\1", s)
Success #stdin #stdout 0.45s 79168KB
stdin
Standard input is empty
stdout
[1] "query=xyz"  "query=abcd" "query=fgh"