python-stdnum commit: r60 - python-stdnum/stdnum
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
python-stdnum commit: r60 - python-stdnum/stdnum
- From: Commits of the python-stdnum project <python-stdnum-commits [at] lists.arthurdejong.org>
- To: python-stdnum-commits [at] lists.arthurdejong.org
- Reply-to: python-stdnum-users [at] lists.arthurdejong.org
- Subject: python-stdnum commit: r60 - python-stdnum/stdnum
- Date: Sat, 5 Feb 2011 23:32:02 +0100 (CET)
Author: arthur
Date: Sat Feb 5 23:32:01 2011
New Revision: 60
URL: http://arthurdejong.org/viewvc/python-stdnum?view=rev&revision=60
Log:
allow most kind of characters in number ranges
Modified:
python-stdnum/stdnum/numdb.py
Modified: python-stdnum/stdnum/numdb.py
==============================================================================
--- python-stdnum/stdnum/numdb.py Sat Feb 5 23:08:27 2011 (r59)
+++ python-stdnum/stdnum/numdb.py Sat Feb 5 23:32:01 2011 (r60)
@@ -57,7 +57,7 @@
import re
from pkg_resources import resource_stream
-_line_re = re.compile('^(?P<indent>
*)(?P<ranges>([0-9a-zA-Z]+(-[0-9a-zA-Z]+)?)(,[0-9a-zA-Z]+(-[0-9a-zA-Z]+)?)*)
*(?P<props>.*)$')
+_line_re = re.compile('^(?P<indent>
*)(?P<ranges>([^-,\s]+(-[^-,\s]+)?)(,[^-,\s]+(-[^-,\s]+)?)*)\s*(?P<props>.*)$')
_prop_re = re.compile('(?P<prop>[0-9a-zA-Z-_]+)="(?P<value>[^"]*)"')
# this is a cache of open databases
--
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits
- python-stdnum commit: r60 - python-stdnum/stdnum,
Commits of the python-stdnum project