Well I can’t finish it since my experience with regular expressions is nil, but 2 commands….HTML to text and remove line breaks gives you a starting point I think. I took your posted code…put it in the body of an html file and ran HTML to text as well as remove line breaks. I would think a regular expression would be able to take this to CSV format assuming that items are always in the same order and the same number of items. The pasted code below is exactly as bbedit spits it out from the 2 commands:
4-Wheel ATV Action Magazine Cover Price:$59.88 Then I need the product description, a text that always starts with "About" and it is found here; About 4-Wheel ATV Action Magazine 4-Wheel ATV Action is the ultimate high-performance all terrain vehicle magazine. Each issue gives you full racing coverage, results and schedules, ATV performance tests and shootout competitions, product reviews, and interviews with leading ATV personalities. This magazine subscription brings you all the best action with full-color photos and in-depth articles. Dirt Rider Normal Price: $59.88/year Our Price: $11.99 You save: $47.89 (79.98%) Motocross Action Normal Price: $59.88/year Our Price: $19.99 You save: $39.89 (66.62%) 4 Wheel & Off Road Normal Price: $47.88/year Our Price: $11.99 You save: $35.89 (74.96%) Dirt Wheels Normal Price: $66.00/year Our Price: $19.99 You save: $46.01 (69.71%) On Jan 17, 2014, at 3:50 AM, Johan Niklasson <[email protected]> wrote: > I know it must be possible to gather this data from the many HTML files I > have (product pages) but I cannot figure out how to script it. I also need > all data to be listed in an Excel sheet or CSV file where the structure > should be: -- This is the BBEdit Talk public discussion group. If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
