You can use r"[+-]?\d+" to get positive and negative integers. It returns true to these strings: "+123", "-123", "123"
On Thu, Aug 27, 2009 at 3:15 PM, Bakes <ba...@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? > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list