[Zope] parsing strings in DTML
Timothy Wilson
wilson@visi.com
Mon, 26 Jun 2000 14:02:23 -0500 (CDT)
Hi everyone,
I'm working on what should be a simple problem.
I pulling an address out of an ldap query and the data is in the form of a
$-separated string. Example:
101 Main St.$Anytown$MN$12345
Please correct me if I'm wrong, but I could probably do <dtml-call
"REQUEST.set('parsed_address', _.string.join(old_address, '$')"> except for
the fact that getting "old_address" (the $-separated one) would require its
own <dtml-var old_address> statement. I can't nest <dtml>s so how to I
combine these?
Second question... Once I've got my string parsed into a list called
"parsed_string", what's the syntax for accessing certain elements of the
list?
Thanks.
-Tim
P.S. Maybe I should do this in an external or python method, but I thought
it would be overkill for a single operation like this. Am I wrong?
--
Tim Wilson | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN | | http://slashdot.org/
wilson@visi.com | <dtml-var pithy_quote> | http://linux.com/