22 Feb
2005
22 Feb
'05
4:14 p.m.
I am trying to get the re module into zope I have created a folder in the products folder called GlobalModules I have created a __init__.py in this folder it contains: from Products.PythonScripts.Utility import allow_module allow_module('re') This allows the import to work and the line: matchstr = re.compile(r"""\D""") # search for non numbers Zope does not error on the above line. however it does not like: phone_primary = matchstr.sub(r'',phone_primary) # remove non numbers for the string The error is Error Type: Unauthorized Error Value: You are not allowed to access 'sub' in this context How do I get the matchstr.sub to work? Thanks Gene Tuttle