在Yahoo管道中,如何合并2个字段? [英] In yahoo pipes, how can I combine 2 fields?
问题描述
我正在尝试修改rss字段的标题以包含来自另一个字段的文本.如何将这两个字段放在一起创建一个新字段? 谢谢, CP
I am trying to modify a title of a rss field to include text from another field. How can I put these two fields together to make a new field? Thanks, CP
推荐答案
您可以使用 Regex 运算符组合两个字段,方法是在替换模式中使用${...}
表示法来引用其他字段.
You can combine two fields using the Regex operator, by using ${...}
notation in the replacement pattern to refer to other fields.
例如,如果要将title
字段替换为pubDate
和link
字段的组合,则可以这样设置参数:
For example, if you want to replace the title
field with the combination of the pubDate
and link
fields, you could set the parameters like this:
- 发件人:
item.title
- 替换:
.*
- 使用:
${pubDate} - ${link}
- In:
item.title
- replace:
.*
- with:
${pubDate} - ${link}
在 replace 参数中,我使用了.*
来匹配item.title
的全部内容,并且在和中将${pubDate}
替换为item.pubDate
和${link}
以及item.link
的内容.
In the replace parameter I used .*
to match the entire content of item.title
, and in with ${pubDate}
will be replaced with the content of item.pubDate
, and ${link}
with the content of item.link
.
更多示例和屏幕截图:
如果要与其他字段组合创建新字段:
If you want to create a new field with the combination of others:
如果您想在现有字段之前添加一些内容:
If you want to prepend something to an existing field:
这篇关于在Yahoo管道中,如何合并2个字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!