From: "Micheal Espinola Jr" <[EMAIL PROTECTED]>
> Eric B. wrote:
> > 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].
> >
>
> This regular Expression is very strict, and is based on RFC
> specifications.  The end of a hostname segment must end with an
> alphabetic character or number. \b does not apply such a restriction.

I've never seen the last segment requirement to be an alphabetic character-
only the first. RFC-1123 says-

2.1  Host Names and Numbers

      The syntax of a legal Internet host name was specified in RFC-952
      [DNS:4].  One aspect of host name syntax is hereby changed: the
      restriction on the first character is relaxed to allow either a
      letter or a digit.  Host software MUST support this more liberal
      syntax.

Bro



-------------------------------------------------------------------------
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

Reply via email to