Have you considered using syslog-ng instead of syslog? You can do content filtering in quite flexible ways at a higher level, and you can create reusable configuration .. That way you can split which messages you really *want* to read into several files and throw away the rest. I'd imagine this approach would be easier to maintain than doing it with regexps.