i've just wrote this url validation. it works alright till i dont enter url-s like www.genie.co.uk or www.astalavista.box.sk lets say. the real problem is with the string that comes at the last place, i cant restrict it from being more than 3 chars because of the optional dot before it. once u have a look at the validation u'll see it. i'm not good with explanations🙁 if anybody can offer a suggestion, i'll appreciate it!
here it is:
ereg ("(http://www|www).([-,_])([a-z,A-Z,0-9]+).{2,3}[.]?(([a-z,A-Z]){2,3})[/]?[~]?([/,a-z,A-Z,0-9]+)?$",$url);