fork download
  1. x <- "UNKNOWN_{_requestID___b9b6bcc4-c163-45d7-82d9-423a96cf5fe1_,_deviceID___9c84f871-9e95-45d5-9335-12e7d42b96a0_}_2018-08-15-15-43-01-296_529307b7-6316-4cdc-ab53-2e1158c651c6.txt"
  2. ##sub("^.*_(.*)\\.txt$", "\\1", x)
  3.  
  4. unlist(regmatches(x, regexec("([a-zA-Z0-9-]+)\\.txt", x)))[2]
  5. regmatches(x, regexpr("[a-zA-Z0-9-]+(?=\\.txt)", x, perl=TRUE))
Success #stdin #stdout 0.23s 39824KB
stdin
Standard input is empty
stdout
[1] "529307b7-6316-4cdc-ab53-2e1158c651c6"
[1] "529307b7-6316-4cdc-ab53-2e1158c651c6"