Extracting data between specific html tags from Yellowpages

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

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

Extracting data between specific html tags from Yellowpages

Post by trpaquette »

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: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Extracting data between specific html tags from Yellowpages

Post by DataMystic Support »

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
Post Reply