Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

cumbersome regexp operations

Name: Anonymous 2008-10-30 5:06

i believe all programmers doubt their skill from time to time and so have i now

mostly posting because i'm bored at work, doing some regexp at home to parse some machine generated html, we all know how that goes

basically to avoid spaghetti code i'm doing it in several stages, this produces more loops but it keeps the code clean because it might be used and edited by others

so basically i get the html code, localize the specific line my required info is in because it is machine generated it all ends up on one line lol

then i split that one line up, since it's a html table i replace <\/?tr> with \n so i get each row of the table where my data is by itself

then i'm confused as to what is the best approach, at this point i split at <\/?td> and put each line into an array which i loop through and gather the info i need in a more structured hash from which i can later fetch info with predefined values used as keys

Name: Anonymous 2008-10-30 13:50

Serious answer, I did this for a screenscraping project before:

Shove the HTML through Lynx to render it to a normal text file, then parse that.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List