Reputation: 1135
I need to build a Yahoo! Pipe that copies the item.title element and adds it to the end of the item.link element.
Example input:
<item>
<title>helloworld</title>
<link>http://www.example.com/abc</link>
</item>
<item>
<title>whatsup</title>
<link>http://www.example.com/def</link>
</item>
Example output:
<item>
<title>helloworld</title>
<link>http://www.example.com/abc?helloworld</link>
</item>
<item>
<title>whatsup</title>
<link>http://www.example.com/def?whatsup</link>
</item>
Upvotes: 1
Views: 189
Reputation: 124646
You can do that using the Regex operator, by using ${...}
notation in the replacement pattern to refer to other fields, in this case ${title}
:
item.link
$
- ${title}
In the replace parameter I used $
to match the end of item.link
, and in with ${title}
will be replaced with the content of item.title
, thus appending to the end of item.link
.
FYI this other question covers a more general case of combining two fields:
In yahoo pipes, how can I combine 2 fields?
Upvotes: 1