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

Re: [multitail] regex help

René Berber a écrit :
René Berber wrote:

The equivalents to that notation are something like:

\d	[:digit:]+	or	[0-9]+
\S	[:alpha:]+	or	[a-zA-Z]+
i don't agree... \S is not equivalent to alpha, it's the negation of \s, equivalent to [^\s], meaning everithing but whitespaces characters
\s	[:space:]+	or	[ \t]+

Wrong again...

So the expression becomes:

\[[:alpha:]+\] )"


the line will wrap on the mail, but there is a single space before and after the
last match for "[<anything>]".

This message was sent through the MultiTail mailinglist (www.vanheusden.com/multitail)
As far as i know, the collating syntax [:class:], but it could be [.class.] or [=class=] should be used between bracket, and quantifiers should used comma, not dash, something like [[:digit:]]{1,3}

and could be wrote shorter like this
"(([[:digit:]]{1,3}\.){2}(108\.226|108\.243)|^\[.+\]\[[:alpha:]+\] )"
But as i said before, the last part is wrong as it will match all lines (because of greedy .+),

Last part will work when wrote like this

This regex will only match '[bloc1] [bloc2] X' with X <> '['

finally, the command line is
multitail -EB '108\.243|108\.226|^(\[[^]]+\][[:space:]]){2}[^\[]' -E '108\.243|108\.226|^(\[[^]]+\][[:space:]]){2}[^\[]' error_pub.log error_adm.log

My problem was to used the class symbol \s not understood by multitail.



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.