a<-list.files("D:\semon", "*_20100801.nc", full.names = TRUE)
You want this :
a<-list.files("D:\semon", "*_[0-9]{8}[.]nc", full.names = TRUE)
or to be match a classic date pattern:
a<-list.files("D:\semon", "*_\d{4}\d{2}\d{2}[.]nc", full.names = TRUE)
EDIT
The OP is looking to order the output of list.files
a<-list.files("D:\semon", "*.nc", full.names = TRUE)
a[order(gsub('.*_(\d{8})[.].*','\1',a))]
For example:
a <- c('D:\AMSER\amser2010+2011/LPRM-AMSR_E_L3_D_SOILM3_V002-20120603T170757Z_20110916.nc',
"D:\AMSER\amser2010+2011/LPRM-AMSR_E_L3_D_SOILM3_V002-20120603T194524Z_20110917.nc",
"D:\AMSER\amser2010+2011/LPRM-AMSR_E_L3_D_SOILM3_V002-20120604T122649Z_20110915.nc")
a[order(gsub('.*_(\d{8})[.].*','\1',a))]
[1] "D:\AMSER\amser2010+2011/LPRM-AMSR_E_L3_D_SOILM3_V002-20120604T122649Z_20110915.nc"
[2] "D:\AMSER\amser2010+2011/LPRM-AMSR_E_L3_D_SOILM3_V002-20120603T170757Z_20110916.nc"
[3] "D:\AMSER\amser2010+2011/LPRM-AMSR_E_L3_D_SOILM3_V002-20120603T194524Z_20110917.nc"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…