正则表达式检查多个URL?

时间:2016-08-07 07:28:11

标签: regex

我正在尝试检查网址是否等于以下任何网址,但我无法让它工作。

Regex支票将在Google Event Manager中实施,以检查Twitter,Facebook,YouTube,RSS和Google +的社交点击次数

我尝试点击网址与RegEx匹配:

twitter.com/example|facebook.com/example|youtube.com/c/example|example.com/feed/rss/|google.com/b/107779391932152668583/+example/

1 个答案:

答案 0 :(得分:1)

你需要在你的模式中逃脱的唯一特殊字符是

  • 一个点
  • 加号

GA regexp不使用regdx分隔符,因此您不必转义正斜杠(您需要它们在在线正则表达式测试器上进行测试)。

使用

twitter\.com/example|facebook\.com/example|youtube\.com/c/example|example\.com/feed/rss/|google\.com/b/107779391932152668583/\+example/
相关问题