Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50810

Re: grimace: a fluent regular expression generator in Python

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Gregory Ewing <greg.ewing@canterbury.ac.nz>
Newsgroups comp.lang.python
Subject Re: grimace: a fluent regular expression generator in Python
Date Thu, 18 Jul 2013 11:51:34 +1200
Lines 16
Message-ID <b4op08FehpU1@mid.individual.net> (permalink)
References <mailman.4800.1374059632.3114.python-list@python.org>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net aMsZ2ifOC4EaU8Lm1RfxEwklKTYgxfVKjYWyxj1ks1pR7Sqvs0
Cancel-Lock sha1:LsjbvEu0O/XGCoQ9vk/ydFZwOvI=
User-Agent Mozilla Thunderbird 1.0.5 (Macintosh/20050711)
X-Accept-Language en-us, en
In-Reply-To <mailman.4800.1374059632.3114.python-list@python.org>
Xref csiph.com comp.lang.python:50810

Show key headers only | View raw


Ben Last wrote:
>         north_american_number_re = (RE().start
>         .literal('(').followed_by.__exactly(3).digits.then.__literal(')')                        
>          .then.one.literal("-").then.__exactly(3).digits
>         .then.one.dash.followed_by.__exactly(4).digits.then.end
>                                              .as_string())

Is 'dash' the same as 'literal("-")'?

Is there any difference between 'then' and 'followed_by'?

Why do some things have __ in front of them? Is there a
difference between 'literal' and '__literal'?

-- 
Greg

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: grimace: a fluent regular expression generator in Python Ben Last <ben@benlast.com> - 2013-07-17 10:33 +0800
  Re: grimace: a fluent regular expression generator in Python Johann Hibschman <jhibschman@gmail.com> - 2013-07-17 07:55 -0500
  Re: grimace: a fluent regular expression generator in Python Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-07-18 11:51 +1200

csiph-web