I have a set of files for each months and year stretching from 1881-2021. Names are in format month/year and look like:
01_Jan/193501asc.gz
09_Sep/188209asc.gz
01_Jan/197501asc.gz
07_Jul/202107asc.gz
I wonder how to write a regex expression to filter only the files that more then 1970? (period 1970-2021?) I have tried:
file_ls <- list.files(paste(myPath, "data", sep = "/"),
pattern = "[>1970]",
#pattern = "[1970-2021]",
#pattern="*\\.gz$", # ending character
recursive=TRUE)
Expected files to return (years in period 1970-2021):
01_Jan/197501asc.gz
07_Jul/202107asc.gz