Re: trying to understand HTML::TreeBuilder::XPath

2013-01-29 Thread Rob Dixon
On 26/01/2013 20:44, Jeswin wrote: > Hi, > I'm trying to parse out the emails addresses from a webpage and I'm > using the HTML::TreeBuilder::XPath module. I don't really understand > XML and it's been a while since I worked with perl*. So far I mashed > up a code by looking through past examples o

Re: trying to understand HTML::TreeBuilder::XPath

2013-01-28 Thread Charles DeRykus
On Mon, Jan 28, 2013 at 8:21 AM, Brandon McCaig wrote: > On Sat, Jan 26, 2013 at 06:16:14PM -0800, Jim Gibson wrote: >> Better add periods to that regular expression character class: >> >> if( $link =~ /mailto:([\w@.]+)/ ) { >> >> … or include everything up to but not including the second double

Re: trying to understand HTML::TreeBuilder::XPath

2013-01-28 Thread Brandon McCaig
On Sat, Jan 26, 2013 at 06:16:14PM -0800, Jim Gibson wrote: > Better add periods to that regular expression character class: > > if( $link =~ /mailto:([\w@.]+)/ ) { > > … or include everything up to but not including the second double-quote: > > if( $link =~ /"mailto:([^"]+)/ ) { I've never

Re: trying to understand HTML::TreeBuilder::XPath

2013-01-26 Thread Octavian Rasnita
From: "Jeswin" Hi, I'm trying to parse out the emails addresses from a webpage and I'm using the HTML::TreeBuilder::XPath module. I don't really understand XML and it's been a while since I worked with perl*. So far I mashed up a code by looking through past examples online. The HTML portion f

Re: trying to understand HTML::TreeBuilder::XPath

2013-01-26 Thread Jim Gibson
On Jan 26, 2013, at 3:52 PM, Jim Gibson wrote: > However, if your program is successfully finding all of the tag sections > of the web page, and your only problem is distinguishing between email links > and other types of links, you can use regular expressions to detect mailto > links: > > m

Re: trying to understand HTML::TreeBuilder::XPath

2013-01-26 Thread Jim Gibson
On Jan 26, 2013, at 12:44 PM, Jeswin wrote: > Hi, > I'm trying to parse out the emails addresses from a webpage and I'm > using the HTML::TreeBuilder::XPath module. I don't really understand > XML and it's been a while since I worked with perl*. So far I mashed > up a code by looking through past

trying to understand HTML::TreeBuilder::XPath

2013-01-26 Thread Jeswin
Hi, I'm trying to parse out the emails addresses from a webpage and I'm using the HTML::TreeBuilder::XPath module. I don't really understand XML and it's been a while since I worked with perl*. So far I mashed up a code by looking through past examples online. The HTML portion for the email is like