java - Matching date ranges using Regex -
i need regex match file names, dated logs, , need fetch logs 24th 31st. there 2 type of logs.
log filenames follows:
log_file_first-type_24-03-2013 log_file_second-type_24-03-2013 i have tried following:
log_file_(first|second)\-type_(2,3)(4,1)\-03\-2013 but takes in 21st also, how this?
regular expressions powerful, have several limitations. there not in integers' ranges. not elegant solution, works:
log_file_(first|second)\-type_(2[4-9]|30|31)\-03\-2013
Comments
Post a Comment