in reply to Extracting datapart (YYYYMMDD) with filename regular expression

For the file names you've shown, a simple regex looking for 8 digits will do it:
/\d{8}/
Now, assuming you are not going to look for Apache logs dating from the twentieth century and that your program is likely to be obsolete in the 22nd century, you could narrow down the search:
/\b20\d{6}\b/
or narrow it down even further with something like this (untested):
/\b20[12]\d[01]\d[0123]\d\b/
(Of course, it is up to you to add capturing parentheses if you need.)