AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.4K members online now
2.4K members online now
Ask questions about filter set-up and issues with using filters in Google Analytics reports
 
Guide Me
star_border
Reply

regex help

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

I'm afraid my regex skills are lacking. Can someone help me write a regex for these two URLs?

 

/plays/evt_detail.aspx?id=438

/events/c-s-lewis-onstage/

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author PatientRock
March 2016

Re: regex help

Top Contributor
# 4
Top Contributor
Test with the following instead then
\/(plays\/evt_detail\.aspx\?id\=438)|(events\/c\-s\-lewis\-onstage\/)
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

View solution in original post

Re: regex help

Top Contributor
# 2
Top Contributor
Hi :-)
Do you just need a seperate regex for each one..
or do you need them in a single regex..
or.. something else?

If you simply need a seperate regex for each one:
\/plays\/evt_detail\.aspx\?id\=438
\/events\/c\-s\-lewis\-onstage\/
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: regex help

Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆
Single regex-- we launched a new version of our website and I need these two pages to pull in the same report.
Marked as Best Answer.
Solution
Accepted by topic author PatientRock
March 2016

Re: regex help

Top Contributor
# 4
Top Contributor
Test with the following instead then
\/(plays\/evt_detail\.aspx\?id\=438)|(events\/c\-s\-lewis\-onstage\/)
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: regex help

Follower ✭ ✭ ☆
# 5
Follower ✭ ✭ ☆
That did it. Thank you very, very much for your help!

Re: regex help

Top Contributor
# 6
Top Contributor

You're welcome :-)
If you have further questions about Google Analytics, please post back

Cheers
Bronwyn :-)

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here