[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: re question
From:       David <wizzardx () gmail ! com>
Date:       2007-09-20 21:44:27
Message-ID: 18c1e6480709201444w5820f86flfa77c103d76570c7 () mail ! gmail ! com
[Download RAW message or body]

On 9/19/07, Dan Bar Dov <bardov@gmail.com> wrote:
> I'm trying to construct a regular expression to match valid IP address,
> without leading zeroes (i.e
> 1.2.3.4, 254.10.0.0, but not 324.1.1.1, nor 010.10.10.1)
>
> This is what I come up with, and it does not work.
>
> r'(^[12]?\d{0,2}\.){3,3}[12]?\d{0,2}'
>
> What am I doing wrong?
> Any common knowledge IP matching RE?

http://www.regular-expressions.info/examples.html ?
-- 
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic