Page 1 of 1

Extracting data between specific html tags from Yellowpages

Posted: Sat May 22, 2010 1:50 pm
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!!!

Re: Extracting data between specific html tags from Yellowpages

Posted: Mon May 24, 2010 4:01 pm
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