Regular expression syntax, was Re: pylint, was Re: pygame - importing GL - very bad...
Peter Otten
__peter__ at web.de
Thu Jan 3 06:39:12 EST 2013
someone wrote:
> On 01/03/2013 10:00 AM, Peter Otten wrote:
>> Terry Reedy wrote:
>>
>>>> [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with
>>>> [an
>>>> underscore ?
>>>
>>> No, it allows underscores. As I read that re, 'rx', etc, do match. They
>>
>> No, it's one leading letter or underscore [a-z_] plus at least two
>> letters, underscores or digits [a-z0-9_]{2,30}
>
> Ah, [a-z0-9_]{2,30} means there should be at least two characters and
> maximum 30 characters here ?
Yes. See
http://docs.python.org/2/library/re.html#regular-expression-syntax
More information about the Python-list
mailing list