squidg
squidg

Reputation: 357

Regex Checking Multiple URL's?

I'm trying to check if the URL equals to any of the below URLS but I can't get it to work.

The Regex check will be implemented in Google Event Manager to check social clicks for Twitter, Facebook, YouTube, RSS and Google+

I tried Click URL matches RegEx:

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

Upvotes: 3

Views: 5354

Answers (1)

Wiktor Stribiżew
Wiktor Stribiżew

Reputation: 626893

The only special characters you need to escape in your pattern are

  • a dot
  • a plus symbol

GA regexps do not use regdx delimiters, thus you do not have to escape forward slashes (you need them to test at online regex testers).

Use

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

Upvotes: 3

Related Questions