[syslog-ng]regex support

Nate Campi syslog-ng@lists.balabit.hu
Thu, 8 Jul 2004 17:25:47 -0700


On Thu, Jul 08, 2004 at 06:50:32PM +0200, Xavier Lapie wrote:
> On Thursday 08 July 2004 17:56, Joe.Reeves@Regions.com wrote:
> > syslog-ng, but the only thing I have really found mention of is the
> > "match" keyword that matches a simple string. What I wanted to know is if
> > syslog-ng supports either posix or perl style regular expressions.
> 
> From syslog-ng.conf(5):
> 
> * program(regexp to match program name)
> * host(regexp to match program name)
> * match(regexp to match program name)
> 
> From source file filter.c:
> 
> regerr = regcomp(regex, re, REG_NOSUB | REG_EXTENDED);
> 
> And from regex(3):
> 
> REG_EXTENDED
>  Use POSIX Extended Regular Expression syntax  when  interpreting
>  regex.   If  not  set,  POSIX Basic Regular Expression syntax is
>  used.

I've only had to use simple regexps in my match() expressions, and it
always worked well. See some simple examples in the sample config files
linked off the FAQ page (each post to this list has the URL of the FAQ).
-- 
Nate

To do the actual install you have to be root, but none of the normal
build should require that. Don't take the name of root in vain.
	- /usr/src/linux/README