"Micheal Espinola Jr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'll post them here for now. I was really hoping to have > properly comment them, because some of the things I am going you may not > want to - or cant without modification.
Thanks so much for the RegExs! They are a great addition. I was reading through the first validFormatHeloRe however, and was a little confused by it. > ^(([a-z]|\d(?!\d*\.\b))((([a-z\d)]|-(?!-\b)){0,61})[a-z\d])?\.)+(biz|com|edu|gov|info|int|mil|name|net|org|pro|aero|cat|coop|jobs|museum|travel|au|ca|eu|uk|us)\.?$# > second-level domain name (strict) If I break it down, I can see the following (I'm going to ignore the last parameter which is just the different TLDs) ^( ([a-z]|\d(?!\d*\.\b)) :: (any character) or (digit not followed by a digit, a . or the end of a word) ( ( ( [a-z\d]|-(?!-\b) ){0,61})[a-z\d])?\.) :: a character or digit or hyphen not followed by another hyphen or at the end of a word (0-61 times) optionally finishing with a character or digit finsihing with a . I don't understand a couple of things here with that last pattern. For starters, why do you have the [a-z\d] at the end of the expression? Doesn't the (?!-\b) already ensure that the string will finish with [a-z\d] ? If so, why specify it again? Secondly, doesn't this expression also allow the the sequence to begin with a hyphen? I would have expected this sequence to have to start with an [a-z\d]. Finally, I noticed a possible typo in the very first sequence: (( ([a-z\d)] :: any character, digit, ) <--- confused by the ) as a valid char? Is this a typo, or a broken regex? According to your post, your ) is part of the character sequence. I'm not sure if that was a typo, or if your regex is actually showing that. Either way, I thought I would point it out - for both yourself and any other users who might be examining this. Thanks! Eric ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Assp-user mailing list Assp-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/assp-user