NYCPHP Meetup

NYPHP.org

[nycphp-talk] table to tab-delimit

jon baer jonbaer at jonbaer.net
Mon Oct 13 20:34:37 EDT 2003


i just recently had to do the same thing, i ended up lazily doing it in sed
as such:

$ grep -o "<td>.*</td>" file.html | sed "s/<\/td><td>/,/g" | sed
"s/<[/]*td>//g" > file.csv

 - jon

----- Original Message -----
From: "Jay Greenspan" <jay at trans-city.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Monday, October 13, 2003 4:47 PM
Subject: [nycphp-talk] table to tab-delimit


> At this point I know I'm making a relatively easy task difficult.
>
> How would you go about converting an HTML table to tab-delimited text.
> assuming same number of columns for each row and that there will be
> attributes within the table tags.
>
> thanks
>
> -j
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
>




More information about the talk mailing list