Archive - Originally posted on "The Horse's Mouth" - 2007-09-30 17:56:32 - Graham Ellis
I've been working on RSS feeds ... looking to get a page that combines various blogs so that I can have a quick look and see where we stand without having to hop and skip round each in turn. And with magpierss, it's turned out to be quite easy.
Yet some blogs give a summary in the their RSS feeds - a taster, if you like, which is exactly what I want and others spew out the full text, including tags too. How to eliminate the tags, and shorten the text? Well remember that in PHP, there's function to do it
Can you work out my regular expression? It's returning just the first 190 characters of the incoming string ... or a few more up to the following space if it had to gieva good word bread ... followed by 3 dots. But if the incoming string is not as long as 190 characters, it's returned in its entirety.