Extracting data between specific html tags from Yellowpages

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

trpaquette
Posts: 3
Joined: Sat May 22, 2010 1:43 pm

Extracting data between specific html tags from Yellowpages

Postby trpaquette » Sat May 22, 2010 1:50 pm

Hey guys and gals,

I am simply trying to extract the data between certain tags at www.yellowpages.ca (yellowpages.com filter doesn't work since the .ca website coded differently). For example, for phone numbers, the html code that Yellowpages.ca always uses for its listing is "<A class="phoneNumber" ... 555-555-5555 </A>. So I would like to simply restrict an extraction between each instance of <A class="phoneNumber" and the closing "</A> tag and extract the phone number with the specific format of ???-???-????.

Does anyone know what would be the best way of doing this? I'm fairly new to Textpipe Pro and this would be a huge help.. Thanks!!!

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Extracting data between specific html tags from Yellowpages

Postby DataMystic Support » Mon May 24, 2010 4:01 pm

You could use an EasyPattern:

Code: Select all

<A class="phoneNumber"[1+chars, capture( 3 digits, '-', 3 digits, '-', 4 digits ) ]</A>


Replacee with

Code: Select all

$0
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 1 guest