[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[multitail] regex help



i would like to filter some entries from apache log.

i want to display
- all lines that match "client 164.7.108.226" like
  • [Thu Nov 09 08:53:11 2006] [error] [client 164.7.108.226] PHP Notice:  Undefined variable: toto in /sg2/instdev2/htdocs/V4/_FO_/lta.old/bench/test.php on line 7

- all lines that don't match "client" like
  • [Thu Nov 09 08:53:11 2006] [notice] child pid 13313 exit signal Segmentation fault (11)

I try several methods but without any success

such one regexp that should do both thing (match IP or line with this format "[date][level] message")
multitail -Em "(108.243|108.226)|^(\[.+?\]\s){2}(?!\[)" errors.log
this regexp does not even compile on multitail because i guess of negative look ahead assertion (it compile if i put \ before ? but match nothing anyway)
a another way without assertion
multitail -Em "(108.243|108.226)|^(\[.+?\]\s){2}[^\[]" errors.log
match nothing
i saw in documentation we can specify multiple regexp but it will do AND between them, and i need a OR to union

If i test those regexp in tools like regexBuddy or regexCoach, it works and match both kind of lines.

if you have any advice.
Thanks

regards,
    Laurent


-- 





---------------------------------------------------------------------
Sorry, This disclamer is auto added by FW's company
---------------------------------------------------------------------

























Si vous n'etes pas destinataires de ce message, merci d'avertir l'expediteur de l'erreur de distribution et de le detruire immediatement.
Ce message contient des informations confidentielles ou appartenant a La Francaise des Jeux. Il est etabli a l'intention exclusive de ses destinataires. Toute divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de ce message ou des informations qu'il contient, doit etre prealablement autorisee.
Tout message electronique est susceptible d'alteration et son integrite ne peut etre assuree. La Francaise des Jeux decline toute responsabilite au titre de ce message s'il a ete modifie ou falsifie.

If you are not the intended recipient of this e-mail, please notify the sender of the wrong delivery and delete it immediately from your system.
This e-mail contains confidential information or information belonging to La Francaise des Jeux and is intended solely for the addressees. The unauthorised disclosure, use, dissemination or copying (either whole or partial) of this e-mail, or any information it contains, is prohibited.
E-mails are susceptible to alteration and their integrity cannot be guaranteed. La Francaise des Jeux shall not be liable for this e-mail if modified or falsified.