使用 zapier 创建链接数组
Creating an array of links using zapier
我在 Zapier 中有一个带有 typeform 的用例,其中我收到 2-30(基本上是一个未知数)links 到 typeform 中的文件,并希望将它们放入数组中使用扎皮尔。
我通过通知电子邮件的正文 html(定义为 inputData 中的正文字段)获取文本中的 link。每个 link 都采用以下格式:
<a href=\'https://admin.typeform.com/form/results/file/download/<FORMNUMBER>/<VARIABLE>/<FILENAME>.pdf\'>report.pdf</a>
我已经这样做了,但我总是得到 null:
output = [{id: 123, hello: "world"}];
var array_of_matches = inputData.body.match(/href="([^"]*")/g);
console.log(array_of_matches);
您的 HTML 对 href
值使用单引号,但正则表达式试图匹配双引号。请尝试 match(/href='([^']*')/g);
。
我在 Zapier 中有一个带有 typeform 的用例,其中我收到 2-30(基本上是一个未知数)links 到 typeform 中的文件,并希望将它们放入数组中使用扎皮尔。
我通过通知电子邮件的正文 html(定义为 inputData 中的正文字段)获取文本中的 link。每个 link 都采用以下格式:
<a href=\'https://admin.typeform.com/form/results/file/download/<FORMNUMBER>/<VARIABLE>/<FILENAME>.pdf\'>report.pdf</a>
我已经这样做了,但我总是得到 null:
output = [{id: 123, hello: "world"}];
var array_of_matches = inputData.body.match(/href="([^"]*")/g);
console.log(array_of_matches);
您的 HTML 对 href
值使用单引号,但正则表达式试图匹配双引号。请尝试 match(/href='([^']*')/g);
。