• Post Reply Bookmark Topic Watch Topic
  • New Topic

need to get links in the mail by searching the content in the mail  RSS feed

 
Naveen Avula
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
depending on the content of the mail i need to get the links.

For example :

content in MAIL A

folder url: http://examplefolder.com

Document URL: http://example.com


content in MAIL B:


folder url: http://examplefolder.com

Documents:

doc1: http://example1.com
doc2: http://example3.com

my concern is to get only the document urls. i am able to get the all the urls in the link. can any one help on this,please?

searching for the url by using a string into which htmlcode of the mail is stored.
 
Tony Docherty
Bartender
Posts: 3264
81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Please can you explain in more detail what you are trying to achieve. For instance are you just searching through the body of the email for URL's. Do you just want the URL or the URL and the preceding text that states what the link is?
 
Naveen Avula
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if mail contents something like below:

<div>Folder</div>

<span>URL</span>

<a href="http://examplefolder.com">http://examplefolder.com</a>


<div>Document</div>

<span>URL</span>

<a href="http://example.com">http://example.com</a>

i want to extract Document URL and link of document URl only omitting other URLs(ie. folder URL).
There might be more than one document URL.i need all those
There might be other URLs after document URL. i need to omit those.

I guess i am clear. if not i will explain in detail
 
Tony Docherty
Bartender
Posts: 3264
81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are free libraries available to parse HTML documents so you may be able to use one of those to find the <div> tag with a content of 'Document' and then for the next tag gets it href value.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!