I am looking for a function that takes in a string and splits it using a
list of other strings (delimiters) and can return the delimiters as well
as the extra parts of the string. I was trying the split with a regex
built up of the delimiters separated by "|", but it doesn't return the
delimiters which I need.
The goal is an algorithm that can take a string containing html code using
<ul>, <ol>, and <li> and turn it into a formated plain text form like the
following:
<ol>
<li>foo</li>
<li>bar</li>
<ul>
<li>baz</li>
<li>qux</li>
</ul>
<li>asf</li>
</ol>
into:
1) foo
2) bar
* baz
* qux
3) asf
I have everything but tokenizing the html input. I'm sure there is
probably a function in the PHP 4.3.4 libraries that I am missing, but I
can't seem to find it.
--
Justin L. Kennedy
Georgia Institute of Technology, Atlanta Georgia, 30332
Email: jk***@prism.gatech.edu