Bugfix: check string matched before extracting matches

Altered items:
syslog-previous-file