Re: replacing tags between tags
- From: "Jürgen Exner" <jurgenex@xxxxxxxxxxx>
- Date: Mon, 19 Sep 2005 02:30:01 GMT
beartiger@xxxxxxxxx wrote:
> Jürgen Exner wrote:
>> beartiger@xxxxxxxxx wrote:
>>> John Bokma wrote:
>> [...]
>>>> You could use s/// to do this, but it might fail. Better to parse
>>>> the HTML, fix it, and write it out.
>>>
>>> That answers the specific example, but I was looking for something
>>> to answer the general case.
>>
>> Why do you think parsing the HTML would _not_ work in the general
>> case?
>
> I don't. Would you please illustrate what you mean?
Well, John wrote:
<quote>Better to parse the HTML, fix it, and write it out.</quote>
You replied:
<quote>
>>> That answers the specific example, but I was looking for something
>>> to answer the general case.
</quote>
To me that seems to imply that you do not believe that parsing the HTML
would work only for the specific example but not for the general case. If
this was not what you meant then I obviously misunderstood what you wrote.
Anyway, this topic has been discussed a gazillion times before. To parse
HTML use a proper HTML parser because contrary to popular believe parsing
HMTL is not trivial. For further details please see DejaNews and the FAQ
(perldoc -q HTML: " How do I remove HTML from a string?").
jue
.
- References:
- replacing tags between tags
- From: beartiger
- Re: replacing tags between tags
- From: John Bokma
- Re: replacing tags between tags
- From: beartiger
- Re: replacing tags between tags
- From: Jürgen Exner
- Re: replacing tags between tags
- From: beartiger
- replacing tags between tags
- Prev by Date: Thanks -Re: convert $array[0] into $new-array[0,0]
- Next by Date: Re: replacing tags between tags
- Previous by thread: Re: replacing tags between tags
- Next by thread: Re: replacing tags between tags
- Index(es):
Relevant Pages
|