I have a large database of text, read as data frame with one column of text which has few sentences with time mentioned in different formats as below:
Row 1. I tried to call you on xxx-xxx-xxxx, however reached voice mail I'm scheduling our next follow up on 6/13/2018 between 12 PM and 2 PM PST.
Row 2. I will call you again today if I hear something from them, if not, will call you tomorrow between 4 - 6PM EST.
Row 3. We will await for your reply, if we don't hear from you then we will call you tomorrow between 12:00PM to 2:00PM CST
Row 4. As discussed over the call, we scheduled call back for tomorrow between 12 - 02 PM EST.
Row 5. As suggested by you, we will have our next follow up on 6/13/2018 between 12 PM TO 2 PM PST.
Would like to extract just the time part along with EST/CST/PST.
Expected Outputs:
6/13/2018 4 PM - 6 PM EST
tomorrow 12 PM TO 2 PM PST
Have tried the below:
x <- text$string
sc1 <- str_match(x, " follow up on (.*?) T.")
which returns something like:
follow up on 6/13/2018 between 1 PM TO | 6/13/2018 between 1 PM
Tried to combine other formats using below codes
sc2 <- str_match(x, " will call you tomorrow between (.*?) T.")
and do a rowbind to include both formats (follow up * and will call you*)
sc1rb <- rbind(sc1,sc2)
which did not workk
Any way to extract only the time part along with timezone from the above example strings?
Thanks in advance!