in reply to Acceptable regular expressions within command line type syntax

The shell doesn't have regexes, only globs, which are much more limited. You need to look at the manual (or man page) for your particular shell, since there is some difference (e.g. some shells will expand a.{c,o} and some won't).

However, you can use Perl to feed a list of file names to tar. You can opendir, grep, and then pipe the list to tar. Something like this (untested):

opendir DIR, $logs or die "Cannot open dir $logs: $!\n"; my @files = grep /^access_log\.\d+\.gz$/, readdir DIR; close DIR; open TAR, "|tar -czpf $target_file - >savetarout" or die "Cannot open tar: $!\n"; print TAR $_, "\n" for @files; close TAR or die "error closing TAR: $!\n";
Update: the print line should be
print TAR "$logs/$_\n" for @files;