Re: [GIT PULL v2] bkl tracepoints + filter regex support

From: Steven Rostedt
Date: Sat Sep 26 2009 - 06:31:38 EST


On Fri, 2009-09-25 at 11:40 +0200, Peter Zijlstra wrote:

> Using globs in string matches most certainly is useful, no question
> about that.
>
> But I had understood from previous communications we were going to have
> a C syntax, and there == is a straight comparison.
>
> If however people have changed their minds (fine with me) and we're now
> going to script like things..
>
> Anyway, a glob in == just means we have to use another operator if we
> ever want to support actual regexes, ~ would then be recommened I think,
> since that's what awk and I think perl do.

I agree that any use of '==' should be a direct match and if you want to
add a glob expression you can use something else. Like what Peter showed
(~) or even better =~ which is what perl uses.

/me runs

;-)

-- Steve

>
> Personally I wouldn't mind things like:
>
> glob_match(string, pattern)
> regex_match(string, pattern)
>
> But everybody involved in this filter stuff needs to agree what
> direction you want to take the language in.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/