Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.037 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'expressions': 0.07; 'nested': 0.07; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'possible?': 0.16; 'subject:expression': 0.16; 'subject:regular': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'cc:addr:python.org': 0.22; 'parse': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'easy,': 0.31; 'regular': 0.32; 'subject:from': 0.34; "can't": 0.35; 'received:google.com': 0.35; 'even': 0.60; 'expression': 0.60; 'subject:Get': 0.68; 'jul': 0.74; 'otten': 0.84; 'subject:groups': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=TvGVOpLEfmEAxaNwJqiiaM48HQcNBzPt/uHPLqjxV4c=; b=w31zFHokE8Jsd7ZAgqZIEs1Bo/AQVzJaJea8tMh2KgHCWp3KqS7hV2GufNvVTb+eaO P32QpvSujtSO/2OUr2iSbBFPZztxCQvPiRzHlzMSY8IqtSI6ONmwIp5S8FnhYydWsZkA TxRgbJaK6pySQT1RxcNfiDBG5n2M+hlGdsRTX8z7Wk+ajLzkAAUu57mZnLnNEr4En0V/ QFdyTLaE07hKAZnTLd+lmhng9nfU0duHjkAYZAnJYarCu8v/ERCg73aj3G44clkc84XO YUiDrHYCHedVanahJKKWLo8UL3quXQ7PbRU8bGyHvx5YvJ+HlPbSB9zyxme6+IVk0qUO vWzw== MIME-Version: 1.0 X-Received: by 10.52.69.172 with SMTP id f12mr37842215vdu.26.1404230319959; Tue, 01 Jul 2014 08:58:39 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Jul 2014 01:58:39 +1000 Subject: Re: Get named groups from a regular expression From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 7 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1404230322 news.xs4all.nl 2857 [2001:888:2000:d::a6]:52662 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73796 On Wed, Jul 2, 2014 at 1:29 AM, Peter Otten <__peter__@web.de> wrote: > Easy, just write a regular expression to parse regular expressions ;) Hmm, is that even possible? AIUI you can't make a regex that correctly parses nested tokens, and named groups can definitely be nested. ChrisA