Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'sep': 0.09; 'cc:addr :python-list': 0.10; '-tkc': 0.16; ':-p': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'message- id:@tim.thechases.com': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'wrote:': 0.17; 'string,': 0.17; 'simpler': 0.22; '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; 'header:User-Agent:1': 0.26; 'guess': 0.27; "doesn't": 0.28; "d'aprano": 0.29; 'steven': 0.29; 'fri,': 0.30; 'mine': 0.35; 'subject: (': 0.36; 'subject:: ': 0.38; 'subject:-': 0.40; 'subject:, ': 0.61; 'received:50.22': 0.84; 'subject:write': 0.84; 'faster.': 0.91 Date: Fri, 28 Sep 2012 22:50:10 -0500 From: Tim Chase User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111120 Icedove/3.1.16 MIME-Version: 1.0 To: Steven D'Aprano Subject: Re: write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212. References: <5066506D.4020702@tim.thechases.com> <50665A23.1060300@tim.thechases.com> <50666b49$0$29981$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <50666b49$0$29981$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Source: X-Source-Args: X-Source-Dir: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348890545 news.xs4all.nl 6908 [2001:888:2000:d::a6]:59505 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30464 On 09/28/12 22:30, Steven D'Aprano wrote: > On Fri, 28 Sep 2012 21:25:35 -0600, Ian Kelly wrote: > >> Mine is simpler and faster. >> >> r = re.compile("") > > The OP doesn't say that you have to compile it, so just: > > '' > > wins. OP doesn't say it even has to be a string, so I guess wins. :-P It's-too-late-on-a-Friday-night'ly yers, -tkc