[Zope] Regular Expressions
Tino Wildenhain
tino at wildenhain.de
Thu Apr 20 17:24:49 EDT 2006
April Lekin wrote:
> Can you use regular expressions in Zope?
>
> I'm trying to do a date match, something like this:
>
> date = re.match(l_date, '\d\d\d\d\/\d\d/\d\d')
>
> Looks like it doesn't like the "re.match"?
Well, if you look into the zope API documentation
you find all modules you can use in untrusted
(e.g. thru the web) code. re isnt part of the
exposed API. You either write an external method
or a product or you enable modules you think you
can trust to zope scripting. This can be done
by copying Products/PythonScripts/module_access_example.py (or similar)
to yourProductfolder/Yourproduct/__init__.py
and edit it accordingly. Restart zope
and use the modules you want. Make sure you enable
only modules you really can trust.
Regards
Tino Wildenhain
More information about the Zope
mailing list