Yahoo pipes:替换RSS源中的项目

Yahoo pipes:替换RSS源中的项目,rss,yahoo-pipes,Rss,Yahoo Pipes,我对Yahoo pipes有问题 我正在尝试获取位于item.title(RSS提要)末尾的url 我想在item.link中使用该url 我使用一个正则表达式来获取url((f|ht{1}tp://)[-a-zA-Z0-9@:%\+.~#?&/=]+),这样很好 但是我如何使用它来使用item.link呢 现在看起来是这样的: .. <item> <title> Hello this is a test http://www.google.com </title&

我对Yahoo pipes有问题

我正在尝试获取位于item.title(RSS提要)末尾的url 我想在item.link中使用该url

我使用一个正则表达式来获取url((f|ht{1}tp://)[-a-zA-Z0-9@:%\+.~#?&/=]+),这样很好

但是我如何使用它来使用item.link呢

现在看起来是这样的:

..
<item>
<title>
Hello this is a test http://www.google.com
</title>
<link>
http://otherurl
</link>
<description>
Hello this is a test http://www.google.com
</description>
<guid isPermaLink="false">
http://otherurl
</guid>
<pubDate>Tue, 24 Jan 2012 18:27:18 +0000</pubDate>
</item>
..
..
<item>
<title>
Hello this is a test http://www.google.com
</title>
<link>
http://www.google.com
</link>
<description>
Hello this is a test http://www.google.com
</description>
<guid isPermaLink="false">
http://otherurl
</guid>
<pubDate>Tue, 24 Jan 2012 18:27:18 +0000</pubDate>
</item>
..
。。
你好,这是考试http://www.google.com
http://otherurl
你好,这是考试http://www.google.com
http://otherurl
2012年1月24日星期二18:27:18+0000
..
我想这样做:

..
<item>
<title>
Hello this is a test http://www.google.com
</title>
<link>
http://otherurl
</link>
<description>
Hello this is a test http://www.google.com
</description>
<guid isPermaLink="false">
http://otherurl
</guid>
<pubDate>Tue, 24 Jan 2012 18:27:18 +0000</pubDate>
</item>
..
..
<item>
<title>
Hello this is a test http://www.google.com
</title>
<link>
http://www.google.com
</link>
<description>
Hello this is a test http://www.google.com
</description>
<guid isPermaLink="false">
http://otherurl
</guid>
<pubDate>Tue, 24 Jan 2012 18:27:18 +0000</pubDate>
</item>
..
。。
你好,这是考试http://www.google.com
http://www.google.com
你好,这是考试http://www.google.com
http://otherurl
2012年1月24日星期二18:27:18+0000
..
使用将
项目.标题
复制到
项目.链接
然后修改
项目.链接

1) 在
item.link中
*
替换为
${title}


2) 在
item.link中
“*”
(不带引号,请注意末尾的空格)替换为
(空)

我找到了它!应该是

^.*(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+).*$

它将选择所有内容,直到找到url

Tnx,为了快速响应。我现在可以将整个item.title复制到item.link,但如何仅提取url(您提供的步骤2)?我可以给你管道:正则表达式的问题是我可以找到并选择url,但我无法提取它。首先我做一个:重命名item.description copyas linkje。然后一个REGEX item.linkje用$1替换((f|ht{1}tp://)[-a-zA-Z0-9@:%\+.~#?&/=])。然而,我仍然得到了整个句子,而不仅仅是网址。如何更改代码以仅显示url?添加了正则表达式以提取url。注意:仅适用于简单的“带空格的某些文本”情况