我是regex的新手,我正尝试使用Google Analytics(分析)来跟踪转化 https://foo.com至 https://signup.foo.com/signup/signup.php?step=signup&nats=MzAwMDk2Mi&switched=1&strack=0&tpl=page_approval
我需要将signup.foo.com上的任何内容与参数tpl = page_approval匹配
答案 0 :(得分:0)
尝试一下:
signup\.foo\.com\/\S*[?&]tpl=page_approval\b\S*
说明:
signup\.foo\.com\/ # domanin + bar
\S* # 1 or more non-whitespace characters
[?&]tpl=page_approval # a '?' or '&' character + rpl=page_approbal
\b # bareword
\S* # Use this if you must match the whole url.