Extract Dates in any format from Text in R
问题 I want to Extract Dates from the Given Text , Dates can be in any format April 10 2018, 10-04-2018 , 10/04/2018, 2018/04/10, 04.10.2018 like in other formats .... I have news data and want to extract dates from the text for example : My Friend is coming on july 10 2018 or 10/07/2018 i want to extract date from the given text Please Help Thanks in advance 回答1: we extract it using str_extract and then with anydate get the format library(anytime) library(stringr) anydate(str_extract_all(str1, "[