[leafnode-list] Re: WANTED: leafnode-1 filter examples from real-life
Matthias Andree
matthias.andree at gmx.de
Thu Mar 30 23:27:47 CEST 2006
"Michael R. McCarrey" <wa7qzr at myrealbox.com> writes:
> I wanted to drop you a note to thank you for your quick response to my
> questions concerning leafnode-1 filters. It was very helpful. I've managed to
> craft a couple dozen filter statements together which, if my eyes are not
> deceiving me and the syslog is telling me the truth, are working.
I think it's safe to assume that neither your eyes nor the syslog are
deliberately cheating, at least not as far as leafnode is concerned --
provided you haven't incinerated hallucination inducing substances.
> As I said above, I've now about a dozen working filters. They are heavily
> commented; nearly every keystroke is explained (which, I hope, said
> explanation is correct) before the rule is encountered. Perhaps someone else
> might find them useful. If you'd like, I'll post them here or email you
> directly with them, (your preference), after they have run a few more days
> against the rc3 version.
Good to hear you've made progress. I'd be interested to add them to the
examples that ship with leafnode if you don't mind, and since that
changes only documentation and is thus safe to change even in the last
minute, I'm ready to hold off on the 1.11.5 release a few more days, too.
> Earlier, you asked about the program "regexcoach". I'm not too sure what all
> it understands (a lot of these regular expressions, especially the PERL
> extensions, read like Greek did to me, before I learned Greek, but that's
> another story).
I don't claim to have mastered only half of the Perl regular expression
features either, so don't worry. Just like with human languages, they
are already good for day-to-day purposes if you know just the bare
basics of grammar and the first 1,000 words, even if a language knows
10,000 words and complex grammar. With such, you can ask your way
around, chat about the weather and family -- and it's the same with
regular expressions. Many people get away with knowing that "." is any
character, ".*" is any sequence of characters, "\." is a literal dot,
"^" anchors to the beginning and "$" to the end of a line.
There's arcane magic in regexps, but few problems require such complex
expressions. OK, I should thinks Morse code matching (writing . and -)
might get awfully complex in regexps...
--
Matthias Andree
More information about the leafnode-list
mailing list