Solved

reg ex for site filter for google analytics

Posted on 2011-09-29
8
279 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 4

Author Comment

by:jeremyBass26
ID: 36816081
I have been playing with

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

and trying to get that to work
0
 
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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

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…
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

861 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