This project is read-only.


Question class constructor bug


Line 45 currently reads:
if (domain.Length ==0 || domain.Length>255 || !Regex.IsMatch(domain, @"^[a-z|A-Z|0-9|-|_]{1,63}(\.[a-z|A-Z|0-9|-|_]{1,63})+$")) I haven't written many regexps recently, but this doesn't seems to work for domains with "-" in them.
if (domain.Length ==0 || domain.Length>255 || !Regex.IsMatch(domain, @"^[a-z|A-Z|0-9|\-|_]{1,63}(\.[a-z|A-Z|0-9|\-|_]{1,63})+$")) works fine. So I'm guessing I'm right in saying this is a bug?
Closed Aug 10, 2011 at 10:44 AM by
Seems to be working as supposed to


TuxyQ wrote Jun 24, 2011 at 3:14 PM

I'll look into it, could quite possibly be right.

TuxyQ wrote Aug 10, 2011 at 10:44 AM

I've tested this and the current Regex seems to match allready.
some regex engines requires escaping of special characters, others don't, seems .net uses one of the latter kind.