homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
Forum Library, Charter, Moderators: DixonJones & mademetop

Website Analytics - Tracking and Logging Forum

RegEx for repetition of /

Msg#: 4568359 posted 10:23 pm on Apr 26, 2013 (gmt 0)

I'm trying to figure out how i can do an advanced filter in GA on just urls that have one / (the first /), and no more. I don't want any subdirectories coming up.

I tried various things such as:


and others but nothing seems to work... any ideas?




WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4568359 posted 1:42 am on Apr 27, 2013 (gmt 0)

If it boils down to a pure Regular Expression question I can help you figure it out. But I'd need more information because I'm sure there is some syntax that's specific to GA.

Viewed purely as a RegEx, the form
would mean "one slash" -- with no information about what comes before or after. So there could be any number of slashes, either contiguous or scattered about.
Similarly, the form
would mean, well, basically nothing.

If I were doing your search in raw logs, I would look for


replacing the + with a * if I wanted to include requests for the front page (expressed as slash alone). The foregoing is not literally true, since each line of logs contains several categories of information. It's not just the request by itself. But the principle is there.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Website Analytics - Tracking and Logging
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved