[Zope] String Replacement Function

Asad Habib ahabib at engin.umich.edu
Thu Jul 14 16:00:52 EDT 2005


Is it possible to replace more than 1 type of character in a string
simultaneously? If so, what is the correct syntax for this? I am currently
using the following:

<dtml-var "_.string.replace(testString, _.chr(10), '<br />')">

For this string, I want to replace both newlines and carriage returns
(_.chr(13)) with the break tag.

Any help would be appreciated. Thanks.

- Asad


More information about the Zope mailing list