|
From: chromatic <chr...@wg...> - 2002-09-05 20:14:29
|
On Thursday 05 September 2002 11:47, i18n wrote:
> 1 while ($story_content =~ m|<A(.*?)>(.*?)</A>|sgi) {
> 2 my($url, $label) = ($1, $2);
> 3 $label =~ s/(\S{30})/$1 /g;
> 4 $related_links .= "<LI><A$url>$label</A></LI>\n" unless
> $label eq "[?]";
> Does anybody have an improved Regex for the questionable line 3, or is it
> even necessary at all? Can I just comment it out?
A better approach would be to use a real HTML parser that can distinguish
between tags and content.
*insert handwaving*,
-- c
|