ip address naming convention

A

angie

i have to validate a field whether the input is a valid ip address or
a server name... is there any commonly agreed naming convention for
that??? how should i go about this?
 
R

Ron Natalie

angie said:
i have to validate a field whether the input is a valid ip address or
a server name... is there any commonly agreed naming convention for
that??? how should i go about this?

IP addresses consist of only digits and three '.' characters.
Anything else might be a host name.

That should lead you to a solution.
 
G

Gianni Mariani

Ron said:
IP addresses consist of only digits and three '.' characters.
Anything else might be a host name.

That should lead you to a solution.

IPV6 address are are little more complex - given that the world is
moving over to IPv6 in a few months then we'll need to consider that....
 
R

Ron Natalie

Gianni said:
IPV6 address are are little more complex - given that the world is
moving over to IPv6 in a few months then we'll need to consider that....

OK digits and colons...big deal. All he says he wanted to know if it
was a name or address, not how to parse the address into the 32 (V4) or
128 (V6) address value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top