x <- c("R uses 1:5 for 1, 2, 3, 4, 5.",
"At 3:00 we'll meet up and leave by 4:30:20",
"We'll meet at 6:33.", "He ran it in :22.34")
rm_time(x)
rm_time(x, extract=TRUE)
## With AM/PM
x <- c(
"I'm getting 3:04 AM just fine, but...",
"for 10:47 AM I'm getting 0:47 AM instead.",
"no time here",
"Some time has 12:04 with no AM/PM after it",
"Some time has 12:04 a.m. or the form 1:22 pm"
)
rm_time(x, extract=TRUE)
rm_time(x, pat="@rm_time2", extract=TRUE)
rm_time(x, pat="@rm_time2")
rm_time(x, pat=pastex("@rm_time2", "@rm_time"), extract=TRUE)Run the code above in your browser using DataLab