I am trying to get all logfiles between two dates with regular expressions.
My current expression is ^logfile-?('20120101').
From is “20120101” and end is “20120131”for example.
finding a specific logfile is no problem, i have problems to define the between-days-condition.
For the date part of the regex it should be sufficient to search for
201201\d\d. This will match every String from “20120100” to “20120199”, so it would match every day in January.So probably something like this would do it:
^logfile-(201201\d\d)If you want to reduce it to a specific period in the same month (for example from 7th july till 21th july) then it could look like this: