I need to extract the month from a series of strings in the format:
Tue Jan 05 03:29:10 CET 2016
I have tried with:
#extracting the second capturing group
sub("([A-z]{3})\\s([A-z]{3})","\\2","Tue Jan 05 03:29:10 CET 2016")
#or just the first whitespace with the Month:
sub("\\s([A-z]{3})","\\2","Tue Jan 05 03:29:10 CET 2016")
My expected output, in this case would be:
"Jan"