Is this a valid regular expression for IP-addresses?
^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-5]{2}|0{2}|0{3})\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-5]{2}|0{2}|0{3})$
Is this a valid regular expression for IP-addresses?
^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-5]{2}|0{2}|0{3})\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-5]{2}|0{2}|0{3})$
Not correct : in the first part ((....){3}) : the last 2[0-5]{2} will allow 201, 254, etc, but not 239, etc (ie, last digit >5)
Now, a 5 seconds search in a search engine gave me this url : http://answers.oreilly.com/topic/318-how-to-match-ipv4-addresses-with-regular-expressions/
And as @Sigardave pointed out, a more "local" solution ^^ (ie, in the same area of the Internet) : Regular expression to match DNS hostname or IP Address?