Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #50810
| From | Gregory Ewing <greg.ewing@canterbury.ac.nz> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: grimace: a fluent regular expression generator in Python |
| Date | 2013-07-18 11:51 +1200 |
| Message-ID | <b4op08FehpU1@mid.individual.net> (permalink) |
| References | <mailman.4800.1374059632.3114.python-list@python.org> |
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 | Next — Previous in thread | Find similar | Unroll 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