grimace: a fluent regular expression generator in Python

Gregory Ewing greg.ewing at
Thu Jul 18 01:51:34 CEST 2013

Ben Last wrote:
>         north_american_number_re = (RE().start
>         .literal('(').followed_by.__exactly(3).digits.then.__literal(')')                        
>                                              .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'?


More information about the Python-list mailing list