Solved

reg ex for site filter for google analytics

Posted on 2011-09-29
8
277 Views
Last Modified: 2012-05-12
Hello we need to do a filter that is like this

www.admin.com
www.admin.com/?vb=something       <<< only on in this profile to be shown
www.admin.com/other

so the regex need to block all that dose not have ?vb=something . please let me know if this is not totally clear but the short is we need to show nothing but the one path with out useing the javascript to set the domain path as that is not an option here.  Just need to filter data on the reporting end of google.  

Thank you
Cheers -Jeremy
0
Comment
Question by:jeremyBass26
8 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36815886
You might try:

\?vb=.*$

Open in new window

0
 
LVL 4

Author Comment

by:jeremyBass26
ID: 36816009
so a quick test here http://regexhero.net/tester/ of  

test.domain.edu/?vb=test

with

\?vb=.*$

dosn't provide a match thou it doesn't match just test.domain.edu/ as expected.

tk -j

0
 
LVL 4

Author Comment

by:jeremyBass26
ID: 36816049
oh and I beleive for google you need it to be a not match ?vb= in string as when you put the filter in you are asking them to filter so we need to filter all but ?vb=
0
 
LVL 4

Author Comment

by:jeremyBass26
ID: 36816081
I have been playing with

^.*?(?!\?vb\=).*?$

and trying to get that to work
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36816803
Try:

\?(?!vb=)

Open in new window

0
 
LVL 10

Expert Comment

by:mark_harris231
ID: 36893648
I believe you want this:

Match: ^([^\?]*)$    (match all characters unless a question mark is found)
Replace:                (i.e., replace the matched line with a blank line

If you want to eliminate the blank lines and condense the report, replace $ with \n or \n\r  (not sure if your report contains carriage returns)
0
 
LVL 35

Accepted Solution

by:
Terry Woods earned 500 total points
ID: 36900594
I think this is what you want:

^(.(?!\?vb=))*$
0
 
LVL 4

Author Closing Comment

by:jeremyBass26
ID: 36903266
Perfect.. Thanks everyone else but this was it.  

Glad to see mine :
^.*?(?!\?vb\=).*?$

was not far off .. TerryAtOpus's

^(.(?!\?vb=))*$

worked perfectly at that http://regexhero.net/tester/ site.  Thanks for the help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now