regexp help

Peter Pearson ppearson at nowhere.invalid
Thu Aug 27 22:31:01 CEST 2009


On Thu, 27 Aug 2009 11:15:59 -0700 (PDT), Bakes <bakes at ymail.com> wrote:
> If I were using the code:
>
> (?P<data>[0-9]+)
>
> to get an integer between 0 and 9, how would I allow it to register
> negative integers as well?

(?P<data>-?[0-9]+)

-- 
To email me, substitute nowhere->spamcop, invalid->net.



More information about the Python-list mailing list