views:

860

answers:

1

I would like to remove the item.description part of a twitter feed within yahoo pipes and I haven't figured out how to do it yet.

Obviously the filter module will remove posts with that item so I've been trying to use Regex. I think clearing the item.description field would work well enough. Is there a Regex expression that would replace the entire string?

Basically the goal is to make a twitter post that displays only the title and publish date. Basically, the item.description field is producing redundant information.

A copy of the pipe can be found here.

A: 

Ideally you would want to use an XSLT to do this - something like this:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
    <xsl:template match="*">
     <xsl:copy>
      <xsl:copy-of select="@*" />
      <xsl:apply-templates />
     </xsl:copy>
    </xsl:template>
    <xsl:template match="//description">
     <description/>
    </xsl:template>
</xsl:stylesheet>

But since you are using Pipes, try this regular expression:

<description>[^<]*</description>

with this:

<description/>

as a replacement string.

Andrew Hare
This works wonderfully, I plugged [^<]* into the regex module IE - <i>in</i> item.description <i>replace</i> [^<]* <i>with</i> BLANK
MattyFo