Solved

reg ex for site filter for google analytics

Posted on 2011-09-29
8
281 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

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

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

739 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