Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Michael Torrie Newsgroups: comp.lang.python Subject: Re: python regex: variable length of positive lookbehind assertion Date: Wed, 15 Jun 2016 18:40:40 -0600 Lines: 11 Message-ID: References: <8737oemsh9.fsf@elektro.pacujo.net> <0a2f2355-1b2d-4bc7-0113-e35266cb3fd7@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de CJxZVOv7zFn4SkXJb4l/kACdDM5VF9gsmmOmkpNEVu5g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:python': 0.14; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:variable': 0.16; 'wrote:': 0.16; 'looked': 0.16; 'string': 0.17; 'say,': 0.18; 'parse': 0.22; 'am,': 0.23; 'bit': 0.23; 'header:In-Reply- To:1': 0.24; 'header:User-Agent:1': 0.26; 'example': 0.26; '(which': 0.26; 'said,': 0.27; 'actual': 0.28; 'that.': 0.30; 'maybe': 0.33; 'html,': 0.33; 'message-id:@gmail.com': 0.34; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'method': 0.37; 'received:org': 0.37; "won't": 0.38; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'charset:windows-1252': 0.62 X-Virus-Scanned: amavisd-new at torriefamily.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <0a2f2355-1b2d-4bc7-0113-e35266cb3fd7@gmail.com> X-Mailman-Original-References: <8737oemsh9.fsf@elektro.pacujo.net> Xref: csiph.com comp.lang.python:110000 On 06/15/2016 08:57 AM, Jussi Piitulainen wrote: > Marko Rauhamaa writes: >> And nothing in alister's answer suggests that. > > Now *I'm* surprised. He simply said, here's a regex that can parse the example string the OP gave us (which maybe looked a bit like HTML, but like you say, may not be), but don't try to use this method to parse actual HTML because it won't work reliably.