Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'matches': 0.07; 'pypi': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; ':-)': 0.13; 'library': 0.15; '-tkc': 0.16; 'machine?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.17; "shouldn't": 0.17; 'tim': 0.18; 'memory': 0.18; 'module': 0.19; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'guess': 0.27; 'header:X-Complaints-To:1': 0.28; 'run': 0.28; 'chase': 0.29; 'use?': 0.29; 'from:addr:yahoo.co.uk': 0.32; 'skip:8 10': 0.32; "who's": 0.32; 'to:addr:python-list': 0.33; 'thanks': 0.34; 'received:org': 0.36; 'subject: (': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'subject:, ': 0.61; 'subject:write': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. Date: Sat, 29 Sep 2012 02:58:51 +0100 References: <5066506D.4020702@tim.thechases.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-181-118.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: <5066506D.4020702@tim.thechases.com> X-Antivirus: avast! (VPS 120928-1, 28/09/2012), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348883794 news.xs4all.nl 6879 [2001:888:2000:d::a6]:48741 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30453 On 29/09/2012 02:35, Tim Chase wrote: > On 09/28/12 19:31, iMath wrote: >> write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. > > Okay, that was pretty easy. Thanks for the challenge :-) > > -tkc > 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? -- Cheers. Mark Lawrence.