[Mono-list] Implement StrLike in C#

Max Metral max at artsalliancelabs.com
Sun Sep 28 19:30:14 EDT 2008

Yeah, I didn't follow the original link, my apologies... Though for my mileage I'd still rather do it in RegEx's for ultimate conceptual portability, I certainly see your point.  (I think the thread provided the relatively simple "Like Operator" to RegEx mapping function, and a poster made the very valid point that advanced users might appreciate the RegEx power over the Like simplicity.)

That'll teach me to post glib answers. :)

-----Original Message-----
From: Benjamin Podszun [mailto:ben at galactic-tales.de] 
Sent: Sunday, September 28, 2008 7:22 PM
To: Max Metral
Cc: Mono-list at lists.ximian.com
Subject: Re: [Mono-list] Implement StrLike in C#

On Sun, 28 Sep 2008 17:11:44 -0400, "Max Metral" <max at artsalliancelabs.com>
> Wouldn't regular expressions be a better bet?

No, not at all. Without resorting to the "Now he has two problems" quote:
His link [1] describes a scenario where someone expects user input and
wants it to behave like the default windows globs/wildcards. * means 0-N
chars, ? means 0-1 chars, iirc. The link indicates that that cannot (and
doesn't want to) educate his uses how to compose regular expressions, so
this is the easier (and therefor by definition most likely the better)
solution. If the same applies for the OP (or if he's the same, although I
doubt that) regular expressions are not a good option.



More information about the Mono-list mailing list