In Yahoo! Pipes, how do I take a string from item.

2019-06-13 18:32发布

Okay, so I already have a Pipe where I extracted the string I need from item.description, using the Loop and String Regex modules, and am emitting the results with the "emit results" option. Now, where do I go from here?

EDIT: Since an example was requested, here is one:

The item.title is "NBA Game: Lakers vs. Clippers" and the item.description is "The game went into overtime. The final score was 110-90." So the I'd like to extract "110-90" and copy it to the title, where it would then be "... Clippers (110-90)".

1条回答
可以哭但决不认输i
2楼-- · 2019-06-13 19:15

1/ Put the score in "scorefield"

Rename operator: [item.description] [COPY AS] [scorefield]

Regex operator : in [scorefield] replace [.*\(([^)]+)\).*] with [$1]

2/ Append score to item.title

Regex operator : in [item.title] replace [($)] with [$1 ${scorefield}]


Nota :

In the above lines the outside square brackets are to be omitted unless noted otherwise

For complements :

http://beckism.com/2009/04/yahoo_pipes/

https://brooksbayne.wordpress.com/2009/01/11/using-regular-expressions-with-yahoo-pipes/

查看更多
登录 后发表回答