Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: HTML document modification

by rob_au (Abbot)
on May 28, 2004 at 02:39 UTC ( #357119=note: print w/ replies, xml ) Need Help??


in reply to Re: HTML document modification
in thread HTML document modification

The issue with this approach is where the HTML document may include example HTML, including <body></body> tags, within <pre></pre> tags. The regular expression which BrowserUK has provided appears to be somewhat more robust, although I suspect that I will follow his suggestion to try reading the file backwards for the first </body> tag.

 

perl -le "print unpack'N', pack'B32', '00000000000000000000001011011110'"


Comment on Re: Re: HTML document modification
Select or Download Code
Replies are listed 'Best First'.
Re: Re: Re: HTML document modification
by perrin (Chancellor) on May 28, 2004 at 04:00 UTC
    Uh, that would be invalid HTML, wouldn't it? Any examples within the document would have to be escaped.
      Most browsers correctly render invalid html anyways... (Not that I recommend sending browsers invalid html, since it increases parse time, but it still works...)


      ----
      Zak - the office

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://357119]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2015-07-31 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls