从HTML电子邮件中拉出语音邮件脚本(Zapier)

时间:2017-12-15 02:52:03

标签: javascript python html zapier

我正在使用Google语音将语音邮件转录为我在电子邮件通知中收到的文本。我从电子邮件中删除了html标签,并留下了下面的文字:

<!-- div, p, a, li, td {} .links-date a {color:#000000; text-decoration:none} .links-footer a {color:#757575; line-height:12px; text-decoration:none} .links-phone_number a {color:inherit; text-decoration:none} .im {color:#000!important} --> Hey, can you hear me? play message YOUR ACCOUNT HELP CENTER HELP FORUM To edit your email preferences for voicemail, go to the Email notification settings in your account. Google Inc. 1600 Amphitheatre Pkwy Mountain View CA 94043 USA

试图从这个片段中提取“嘿,你能听见我吗?

尝试以粗体显示文本并删除其他所有内容。本文的开头和结尾应始终保持不变。例如,右边的书挡总是“播放消息”,而左边的书挡将始终用“ - &gt;”表示

有没有办法使用formater或代码只提取粗体文字?

1 个答案:

答案 0 :(得分:1)

David来自Zapier平台团队。

正则表达式几乎肯定是你想要的。您可以使用Zapier的Formatter&gt;文字&gt;提取模式。

使用文本作为输入并将其用作模式:--> (.*?) play message YOUR。结果输出为0以用于后续步骤。

您可以在此处查看这些字符的说明:https://regex101.com/r/7wKjuS/3

如果您学习使用它,正则表达式是一个非常强大的工具!