[Zope] Partial string comparisons
Andy Gates
Andy.Gates@bristol.ac.uk
Wed, 13 Jun 2001 14:39:52 +0100
This ought to be mindlessly simple: can I test for a string within
another?
Example: Finding "<ul>" case insensitive within dtml-myvar?
Usage: On a news site, users sometimes put lists in the stories, and I
need to sense them in order to cleanly break out of them when
summary pages truncate the story thus:
<h1>Wow New Product!</h1>
<p>Our new product is great, it has:</p>
<ul>
<li>A titanium case</li>
<li>Rugged carry-straps</li>
<li>Elasticated ... [More]
<< code needed here to close that <ul> neatly >>
----------------------
Andy Gates, Learning and Research Technology
Andy.Gates@bristol.ac.uk - ICQ#74362415
http://www.ilrt.bristol.ac.uk