[PATCH xfree86] Signed-off-by: Oleh Nykyforchyn <oleh.nyk at gmail.com>

Dan Nicholson dbn.lists at gmail.com
Mon May 23 05:54:55 PDT 2011


On Sun, May 22, 2011 at 11:24 PM, Oleh Nykyforchyn <oleh.nyk at gmail.com> wrote:
> On Mon, 23 May 2011 12:55:20 +1000
> Peter Hutterer <peter.hutterer at who-t.net> wrote:
>
>>
>> right, I remember now. my main grief was that it would have been another
>> rather specific syntax instead of the quite common s/foo/bar. i don't have a
>> problem with regex per-se as long as we can get the syntax sorted out.
>>
>
> It seems to me that supporting multiple comparison modes like "strcmp", "strcasecmp",
> "fnmatch", "regex" etc through an optional argument would add more complexity than will
> be used even in rather weird setups. What about two modes: simple |-separated sequence,
> with hardcoded comparison functions, as it is now, and single "regex" per statement,
> which covers all special cases?

The whole reason why the current setup is weird is that it's
completely implicit what type of matching happens in each statement.
MatchProduct is string comparison (case sensitive) while
MatchDevicePath is a path pattern. In your suggestion, how is the
regex specified? If you say another sentinel character, how is that
less complex than adding an argument to specify what the other string
means? We're again making up our own syntax.

--
Dan


More information about the xorg-devel mailing list