Re: Replace a specific block of data



Jay Savage wrote:
On Mon, Oct 27, 2008 at 7:32 AM, Brian <brian54321uk@xxxxxxxxxxx> wrote:
Hello again

Not too sure how to pose this question, but here goes.

Working on an html page.
There are many blocks of code placed between <tr> and </tr> in the page.

The block(s) I am playing with have seven lines of code placed between <tr>
and </tr>, (repeated a number of times throughout the page) but which have
specific differences to all the other blocks. The first being, each line in
this block contains the word scope.
The second being, none of the other blocks contain any of the following data
between ">" and "<"


Hi Brian,

There is no need to reinvent the wheel, here. Parsing HTML is
notoriously difficult, and other people have spent years on the
problem.

Take a look at HTML::Tree or HTML::TokeParser, for starters.

HTH,


Hmm, looks like I might have to change paths here.
Methinks I may have to look into playing with offsets.

Thanks Jay
Brian

.



Relevant Pages

  • Replace a specific block of data
    ... Not too sure how to pose this question, ... Working on an html page. ... The blockI am playing with have seven lines of code placed between and, but which have specific differences to all the other blocks. ... (obviously, the following example changes every single instance, so I know it is totally wrong for the task). ...
    (perl.beginners)
  • Re: Replace a specific block of data
    ... Not too sure how to pose this question, ... Working on an html page. ... The blockI am playing with have seven lines of code placed between ... Parsing HTML is ...
    (perl.beginners)
  • Re: Insider Secrets Of Solving Sudoku Puzzles
    ... cube of the 21st century" or the "fastest growing puzzle in the ... Playing Sudoku is like playing Golf. ... Internet using Lotus Notes and Internet Explorer. ... do HTML, JavaScript, and whatever else. ...
    (rec.puzzles)
  • xpath questions...
    ... playing around with xpath and the html dom... ... i can create a test xpath: ... work when i was playing around with xpather on firefox.. ...
    (comp.lang.python)
  • Re: How to render HTML as text (like lynx does) ?
    ... > I've been playing around with a lot of modules but can't find ... > one that simply represents HTML as text, laying out the tables ... Prev by Date: ...
    (comp.lang.perl.modules)