At 4/2/02 8:56 AM, Charles Daminato wrote:

>I will get this reg_exp for .name added/verified/clarified for you.
>
>Also, the "thrid and fourth character" dash limitation, I believe, is so
>that some form of RACE (etc.) encoding can be introduced in the future for
>multilingual .name names (so people are denied if they do bq-- in any
>segment of the name).  Sounds like .name *may* want to do this, but aren't
>sure how they're going to yet so they're making sure there's no conflicts
>when the time comes. (I'm guessing here)

Ah, okay -- I wasn't being literal enough; so when it says "Hyphens are 
allowed, but not in the third and fourth character positions", it really 
does mean "third AND fourth" (ie., both positions). I thought it meant 
"or".

In that case, my previously suggested regexp is somewhat better than the 
current situation, but mistakenly rejects hyphens on the third and fourth 
level, and doesn't catch the hyphens in the third and fourth character 
position. I tried making a regexp that would do so but couldn't get it 
below four lines, which would almost certainly have bugs.

If the registry checks for the hyphens, maybe you could just let those be 
rejected by the registry with an obscure error message, since it'll 
probably never happen (unless someone's intentionally trying to mess with 
the system).

Anyway, here's my final suggested .name regexp that I believe handles 
everything except the "third and fourth hyphen" problem:

/^(?:[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]\.)?[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA
-Z0-9]\.name$/

Hope that's useful.

--
Robert L Mathews, Tiger Technologies

"The trouble with doing something right the first time is that nobody
appreciates how difficult it was."

Reply via email to