On Sun, May 22, 2011 at 11:24 PM, Oleh Nykyforchyn <[email protected]> wrote:
> On Mon, 23 May 2011 12:55:20 +1000
> Peter Hutterer <[email protected]> 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
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to