fork(2) download
  1. vec <- c("http://s...content-available-to-author-only...v.scot/id/statistical-geography/S02000002",
  2. "http://s...content-available-to-author-only...v.scot/id/statistical-geography/S02000003")
  3. sub(".*(S\\d{8})", "\\1", vec)
Success #stdin #stdout 0.47s 79168KB
stdin
Standard input is empty
stdout
[1] "S02000002" "S02000003"