Menu
Hey,
I at all do not understand ereg things. I want a function, which can check is string valid ip/host.
I mean
127.0.0.1 – valid
127.0.0.1.2 – invalid
1.server.com – valid
1.server.com/asdasd – invalid
I found something like this here:
[url]http://www.experts-exchange.com/Programming/Languages/Regular_Expressions/Q_24459252.html
But I am too nooby to fix it for me. So I asking for yours help ?
Thank you.