Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'patterns': 0.04; 'say,': 0.05; 'matches': 0.07; 'ugly': 0.07; 'django,': 0.09; 'fashion.': 0.09; 'mess': 0.09; 'url:github': 0.09; 'cc:addr:python-list': 0.11; '(before': 0.16; 'chunks': 0.16; 'concert': 0.16; 'expressions.': 0.16; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'notation': 0.16; 'routinely': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'code.': 0.18; 'any,': 0.19; 'thu,': 0.19; 'input': 0.22; 'aug': 0.22; 'manual': 0.22; 'cc:addr:python.org': 0.22; 'closely': 0.24; 'skip': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'program,': 0.31; 'bunch': 0.31; 'dawn': 0.31; 'facility': 0.31; 'regular': 0.32; 'run': 0.32; 'could': 0.34; 'tool': 0.35; 'but': 0.35; 'received:google.com': 0.35; '14,': 0.36; 'dates': 0.36; 'described': 0.36; 'maintained': 0.36; 'done': 0.36; "didn't": 0.36; 'similar': 0.36; 'so,': 0.37; 'two': 0.37; 'level': 0.37; 'pm,': 0.38; 'anything': 0.39; 'how': 0.40; 'easy': 0.60; 'problems.': 0.60; 'most': 0.60; "you're": 0.61; 'back': 0.62; 'information': 0.63; 'developed': 0.63; 'provide': 0.64; 'listings': 0.65; 'to:addr:gmail.com': 0.65; 'system)': 0.69; 'internet': 0.71; 'tour': 0.81; 'everything.': 0.84; 'fail.': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Wj3VFfIxuLUXU9T5JSSRjgRR7ipC3iCNHc+juaz3kwM=; b=zdfRHMP8vnG+0xyth2cQ9GIDvfR/8kJBr7E9ZcXiOPHhjjV1LxtN0+1g6RT87oCHCo 3AaxTl4SW653XIoN+X9YAc2puSXBBBG9zosupRVoWbYGM7TbvhcyckaCpcjzgbHq2S72 bYgGMG7n444LorgA2VdTEPmIJgrW25G3v/boMdko6aVLx+AthGzcyHVWxTRH3t0cb8Hi ef4fB0eukfHi/oYMAuaagId18hpOse9LZ+cCihJ05KCm/tlmtFdf0SQVK4f2rfXUHCoa CPZhNGu+WfbT+dNhNBFQxckJXIA894qeF6NPcqrqa0YVmbNgCG/03qzLKdZ+ULGGvELK jjjw== MIME-Version: 1.0 X-Received: by 10.50.61.138 with SMTP id p10mr1161007igr.20.1408062663854; Thu, 14 Aug 2014 17:31:03 -0700 (PDT) Sender: skip.montanaro@gmail.com In-Reply-To: References: <198ac789-f8e3-4f81-b10f-d7b29c25a70f@googlegroups.com> Date: Thu, 14 Aug 2014 19:31:03 -0500 X-Google-Sender-Auth: LsEbTkj9sTfUQgfd8t8_qxsUUN4 Subject: Re: PyMatch Tool. From: Skip Montanaro To: Chris Angelico 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1408062666 news.xs4all.nl 2879 [2001:888:2000:d::a6]:49982 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:76338 On Thu, Aug 14, 2014 at 5:49 PM, Chris Angelico wrote: > > > Tool -> https://github.com/rfunix/PyMatch > > How is this better than GNU sed? I didn't look closely at the program, but I have an idea how I might use it. Back in the dawn of Internet time (before Y2K, Django, V8, etc) I developed and maintained a concert calendar website. It had a database of tour dates, and a bunch of handwritten HTML. And, I allowed people to describe their concert tour information in a slightly-higher-than-regex level (SLTRL). This facility allowed me to routinely process known tour date listings and update my listings with little, if any, manual intervention. Under the covers, of course, it used regular expressions. I had, as they say, two problems. My solution to failed matches (I was actually the heaviest user of the system) was to provide a