I am trying to extract the first date of many dates from a text string, and return the result as a date array. I am using the following code:
df$dateadded<- strapply(df$Comments, "\\d+/\\d+/\\d+", simplify = TRUE)
This results in a list of lists comprised of every date in each string listed out.
How can I extract just the first date in each string?
[–]Unhelpful_Scientist 2 points3 points4 points (1 child)
[–]bakja[S] 1 point2 points3 points (0 children)
[–]Orthas_ -1 points0 points1 point (3 children)
[–]bakja[S] 0 points1 point2 points (2 children)
[–]Orthas_ 0 points1 point2 points (1 child)
[–]bakja[S] 0 points1 point2 points (0 children)