View Single Post
Old 02-17-2011, 02:43 AM   #1
Finbar127
Member
Finbar127 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
Trying to strip the date from an article URL

Hi Everyone,

I'm trying to create a recipe for a local newspaper. The article URL is formated like this:

"http://www.mahopacnews.com/Articles-c-2011-02-15-207354.112113-Former-official-to-receive-750-daily-for-interim-position-plus-pension-.html"

The print version url is formated like this:

"http://www.mahopacnews.com/LPprintwindow.LASSO?-token.editorialcall=207354.112113"

The problem I have is that this section of the article URL "-c-2011-02-15-" contains a date which changes so using url.replace does not seem to work. Is there a work around for this? I saw a couple of examples using spilt.url however I am new to this and I can't seem to get it to work.

I would also like to strip out all the characters after the article number ie: "-Former-official-to-receive-750-daily-for-interim-position-plus-pension-.html"

I would appreciate any help that you folks could give me.

Thanks

John
Finbar127 is offline   Reply With Quote