【发布时间】:2017-04-24 11:54:54
【问题描述】:
我试图通过Regular Expression Extractor 从Mail Reader Sampler 的子子样本中提取用户ID,但没有成功。
我不明白为什么Regular Expression Extractor 不会检查我的Mail Reader Sampler 的子样本。任何提示我如何提取用户 ID?
我对邮件阅读器采样器的回应。 Sub-Sub-Sample 实际上包含 html 格式的电子邮件。
电子邮件包含这样的部分,其中包含包含用户 ID 的激活链接:
<span class="link-ref"><a href="https://domain.local:443/account/activate?userId=La21BhmS&token=FefcOrcd7g">https://domain.local:443/account/activate?userId=La21BhmS&token=FefcOrcd7g</a></span>
【问题讨论】:
-
试试
userId=([^&\n]+) -
@WiktorStribiżew 感谢您的回复。您建议的正则表达式不起作用。正则表达式评估后仍未设置变量。在我看来,Regex Extractor 似乎更多地忽略了邮件阅读器的子样本。