Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #30465

Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212.

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <jeanpierreda@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'pypi': 0.07; 'lawrence': 0.09; 'sep': 0.09; 'cc:addr:python-list': 0.10; 'library': 0.15; 'machine?': 0.16; 'wrote:': 0.17; "shouldn't": 0.17; 'memory': 0.18; 'module': 0.19; 'subject:) ': 0.20; 'received:209.85.216.46': 0.21; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'guess': 0.27; 'message-id:@mail.gmail.com': 0.27; 'run': 0.28; 'use?': 0.29; 'fri,': 0.30; "who's": 0.32; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'subject: (': 0.36; 'does': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'instead': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'subject:, ': 0.61; 'subject:write': 0.84; 'to:addr:yahoo.co.uk': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=m0wDR+8uFUOqf1oxxGwu8nuvQuFuszjINNbZSQCTRSQ=; b=WmeAatI6aB0MeDSNgp8CaN2NqKPE9TYVBGoERMBiNWIrXlENixlYBz1HSehzLXVI2W doViiCa+EgbWLHGI8mOSkIRsBu9JSk4p7faNhGEz9WAzETl1VvY0EJyckRV7iNOufovX Z5BFNxlZ1tATudBT10OfbaBvWr8uBV5Sz7ec/I8Sg6IL2/ZBBC6g1TGOUmohWUnyH+VI WppKtufZFl/ggOs/ZCZAmoF+Jh9dL7zqniUbjxrLNJ3F+po1DtS7MZAvx7PBppbrkYzr uBFTOPglC+4weNkJvNW1yntwEUaFEdrLFsXtEM2sakQ289/kzWeN3Y8l11a46EaYh4K2 gsTw==
MIME-Version 1.0
In-Reply-To <k45kg5$qpo$1@ger.gmane.org>
References <de40c5ae-e51f-4b21-9355-da06a4882c89@googlegroups.com> <5066506D.4020702@tim.thechases.com> <k45kg5$qpo$1@ger.gmane.org>
From Devin Jeanpierre <jeanpierreda@gmail.com>
Date Sat, 29 Sep 2012 00:25:50 -0400
Subject Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212.
To Mark Lawrence <breamoreboy@yahoo.co.uk>
Content-Type text/plain; charset=UTF-8
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1605.1348892793.27098.python-list@python.org> (permalink)
Lines 8
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1348892793 news.xs4all.nl 6868 [2001:888:2000:d::a6]:37831
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:30465

Show key headers only | View raw


On Fri, Sep 28, 2012 at 9:58 PM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> What's the run time speed like?  How much memory does it use?  Shouldn't you
> be using the regex module from pypi instead of the standard library re?
> Guess who's borrowed the time machine?

O(n), O(1), and I used RE2.

-- Devin

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. iMath <redstone-cold@163.com> - 2012-09-28 17:31 -0700
  Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Tim Chase <python.list@tim.thechases.com> - 2012-09-28 20:35 -0500
  Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Paul Rubin <no.email@nospam.invalid> - 2012-09-28 18:42 -0700
  Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-29 02:58 +0100
  Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Tim Chase <python.list@tim.thechases.com> - 2012-09-28 21:17 -0500
  Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-28 21:25 -0600
    Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-29 03:30 +0000
      Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Tim Chase <python.list@tim.thechases.com> - 2012-09-28 22:50 -0500
      Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-29 10:38 +0100
      Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Chris Angelico <rosuav@gmail.com> - 2012-09-29 20:05 +1000
      Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-29 11:50 +0100
      Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-29 11:04 -0600
      Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Chris Angelico <rosuav@gmail.com> - 2012-09-30 09:26 +1000
  Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Tim Chase <python.list@tim.thechases.com> - 2012-09-28 22:42 -0500
  Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-09-29 00:25 -0400
  Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Fg Nu <fgnu32@yahoo.com> - 2012-09-28 21:25 -0700

csiph-web