在雅虎!管道,如何从 item.description 中获取字符串并将其复制到 item.title ?
好的,我已经有了一个 Pipe,我使用 Loop 和 String Regex 模块从 item.description 中提取了所需的字符串,并使用“emit results”选项发出结果。现在,我该去哪里?
编辑:由于要求提供示例,这里是一个:
item.title 是“NBA 比赛:湖人队 vs 快船队”,item.description 是“比赛进入加时赛。最终比分是 110-90”。所以我想提取“110-90”并将其复制到标题中,然后它将是“... Clippers (110-90)”。
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)".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1/ 将分数放入“scorefield”
重命名运算符:[item.description] [COPY AS] [scorefield >]
正则表达式运算符:在 [scorefield] 中将 [.*\(([^)]+)\).*] 替换为 [$1 >]
2/ 将分数附加到item.title
正则表达式运算符:在 [item.title] 中将 [($)] 替换为 [$1 ${scorefield} ]
注意:
在上面的行中,除非另有说明,否则外部方括号将被省略
对于补充:
http://beckism.com/2009/04/yahoo_pipes/
https://brooksbayne.wordpress.com/2009/01/11/using-regular-expressions-with-yahoo-pipes/
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/