[Zope-Checkins] CVS: Zope2 - DT_String.py:1.42 DT_Var.py:1.40
shane@digicool.com
shane@digicool.com
Fri, 27 Apr 2001 16:59:35 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/DocumentTemplate
In directory korak:/tmp/cvs-serv20465/lib/python/DocumentTemplate
Modified Files:
DT_String.py DT_Var.py
Log Message:
Fixed some re's
--- Updated File DT_String.py in package Zope2 --
--- DT_String.py 2001/04/27 20:27:39 1.41
+++ DT_String.py 2001/04/27 20:59:34 1.42
@@ -158,10 +158,10 @@
r'%(' # beginning
'(?P<name>[a-zA-Z0-9_/.-]+)' # tag name
'('
- '[\0- ]+' # space after tag name
- '(?P<args>([^)"]+("[^"]*")?\)*)' # arguments
+ '[\000- ]+' # space after tag name
+ '(?P<args>([^)"]+("[^"]*")?)*)' # arguments
')?'
- ')(?P<fmt>[0-9]*[.]?[0-9]*[a-z]\|[]![])' # end
+ ')(?P<fmt>[0-9]*[.]?[0-9]*[a-z]|[]![])' # end
, re.I)
_parseTag__roles__=()
--- Updated File DT_Var.py in package Zope2 --
--- DT_Var.py 2001/04/27 20:27:39 1.39
+++ DT_Var.py 2001/04/27 20:59:34 1.40
@@ -378,7 +378,7 @@
def thousands_commas(v, name='(Unknown name)', md={},
thou=re.compile(
- r"([0-9])([0-9][0-9][0-9]([,.]\|$))").search):
+ r"([0-9])([0-9][0-9][0-9]([,.]|$))").search):
v=str(v)
vl=split(v,'.')
if not vl: return v
@@ -390,7 +390,7 @@
while mo is not None:
l = mo.start(0)
v=v[:l+1]+','+v[l+1:]
- l=thou(v)
+ mo=thou(v)
return v+s
def whole_dollars_with_commas(v, name='(Unknown name)', md={}):