> ldata2[2]
[1] " \"pretty\": \"5:06 PM GMT on June 18, 2015\","
# Need to extract only the time information. In this case "5:06 PM GMT on June 18, 2015"
# My attempt
> time <- sub(".* :\"(.*)".*","\\1",ldata2[1])
This is the error message i get : Error: unexpected symbol in "time <- sub(".* :\"(.*)"."
Help appreciated
Your pattern does not match the string so nothing is replaced. Here is the correct pattern: