The whole should be applied, but only one cell is applied.
There are 1234 cells in total. This should all apply but I only apply to one space.
I do not know the meaning of the code, so I can not change it.
How do I get all 1234? Please advise me.
yes<-read.csv(file.choose(),encoding = 'UTF-8',stringsAsFactors = F)
bb<-yes$text
How to divide text (string) by a certain character using r
Messages = strsplit(bb, "\\d{1,2}/\\d{1,2}/\\d{4}")[[1]]
m <- gregexpr("\\d{1,2}/\\d{1,2}/\\d{4}", bb)
Dates = regmatches(bb, m)[[1]]
if(length(Messages) > length(Dates)) { Messages = Messages[-1] }
c<-as.data.frame(cbind(Dates, Messages))
write.csv(c,"tqtqtq.csv")