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 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: References: 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: Xref: csiph.com comp.lang.python:50810 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