in reply to Re: Split tags and words nicely
in thread Split tags and words nicely
Suppose the $html in johngg's Re: Split tags and words nicely were changed to:
Note unbalanced opens (4) and closes (2)q{<tag ref=1><tag ref=1a>Start<tag ref=2>and </tag><tag "ref=3">more</ +tag>and end};
Leaving all else alone, output becomes:
<tag ref=1> <tag ref=1a> Start <tag ref=2> and </tag> <tag "ref=3"> more </tag> and end
... which offers no ready hint or markup or warning that the tags were mis-nested.
This is part of the reason that so many monks will advise against trying to parse the likes of .html or .xml with regexen and advocate the use of some of the modules mentioned above.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Split tags and words nicely
by johngg (Canon) on Dec 28, 2006 at 19:57 UTC |