1

Removing html from the description of a RSS feed

Hi,

I'm attempting to remove two bits of html from the description of the RSS using our pipe (link below).

Our pipe

First of all, we have a stray <p> tag we need to remove, although there is another paragraph tag within the description which is needed.

Secondly, we want to remove the following bit of html <strong>Annotations:</strong> <ul class="diigo-annotations"> <li>

I know I need to do this through the Regex tool, but, without much regex knowledge, am at a bit of a loss of how to do this.

by
5 Replies
  • I'm looking to do the same thing. Anyone's help would be appreciated...

    0
  • So you have the same pipe and exactly the same issues?

    0
  • Something like...
    In item.description replace <((.*annotations.*)|(p></p))> with
    Check g/m/i

    0
  • Pretty much, my RSS description contents are:

    <div><b>Body:</b> <div class="XYZClass"><p>My awesome RSS description is here and it's all I want to pull out of this description including the p tags.​</p></div></div>
    <div><b>Category:</b> <a rel="nofollow" target="_blank" href="SomeXYZURL">Category XYZ</a></div>
    <div><b>Published:</b> 5/17/2013 4:02 PM</div>
    

    I'd like to strip everything out except "

    My awesome RSS description is here and it's all I want to pull out of this description including the p tags.​

    " and like robmo, I'm very new to regex syntax :/

    0
  • Sorry, forgot the code tag. I'd like to strip everything out except...

    <p>My awesome RSS description is here and it's all I want to pull out of this description including the p tags.​</p>
    
    0

Recent Posts

in Pipes