@ Steve Todorov:
Your regex will not only match 999.999... but also 9999.9999... etc.
I'd rather take this regex:
/^(1\d{0,2}|2(\d|[0-5]\d)?)\.(1\d{0,2}|2(\d|[0-5]\d)?)
\.(1\d{0,2}|2(\d|[0-5]\d)?)\.(1\d{0,2}|2(\d|[0-5]\d)?)$/
this should represent any ip (v4). At least it did in a small test here ;)
----
Server IP: 212.124.37.9
Probable Submitter: 84.58.176.33
----
Manual Page -- http://www.php.net/manual/en/function.preg-match.php
Edit -- https://master.php.net/note/edit/86150
Del: integrated -- https://master.php.net/note/delete/86150/integrated
Del: useless -- https://master.php.net/note/delete/86150/useless
Del: bad code -- https://master.php.net/note/delete/86150/bad+code
Del: spam -- https://master.php.net/note/delete/86150/spam
Del: non-english -- https://master.php.net/note/delete/86150/non-english
Del: in docs -- https://master.php.net/note/delete/86150/in+docs
Del: other reasons-- https://master.php.net/note/delete/86150
Reject -- https://master.php.net/note/reject/86150
Search -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.