[collectd] Remind: Does regex match end of a line?

Sebastian Harl sh at tokkee.org
Mon Aug 23 13:22:40 CEST 2010


Hi,

On Mon, Aug 23, 2010 at 02:57:46PM +0400, Denis Melnikov wrote:
> > On Fri, Aug 20, 2010 at 02:15:13PM +0400, Denis Melnikov wrote:
> > > Using tail plugin I want to speed up regex matching via anchoring to
> > > end-of-line with '$'.
> > > But as I can see, the plugin evaluates '$' sign as 
> > something else, maybe
> > > literal '$'.
> > > Is it possible to use '$' sign as anchor to end-of-line?
> > > I.e.:
> > > 
> > > Regex " 200 ([0-9]+\\.[0-9]+)$"
> > 
> > Hrm, that *should* work. The tail plugin uses POSIX extended regular
> > expressions and the only thing to be handled differently is to escape
> > backslashes (as you did). Do you see any errors in the logs? What
> > operating system / libc do you use?

> I use FreeBSD 7.0-RELEASE.
> No errors in logs.

Does «grep -E " 200 ([0-9]+\.[0-9]+)$" <logfile>» work on the command
line (use a single backslash only in this case)?

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100823/1577af39/attachment.pgp 


More information about the collectd mailing list