Regular Expressions Part IX: Plus signs +


This is part nine of a multi-part series I am doing to make Regular Expressions (“RegEx”) more understandable for users of Google Analytics. I am learning and teaching at the same time.

Today, I am writing about the plus sign, +. Here is how GA defines the plus sign:

+ Match one or more of the previous items

This probably seems perfectly reasonable to Google and other old hands at Regular Expressions, because they already know how to define “the Previous Items.” But I didn’t and had to figure it out.


The simplest meaning of “Previous Items” is “previous character.” So, I could look for my name in my Google Analytics search terms by typing this into the “quick filter” box: Rob+in. That will return Robin or Robbin, and for that matter, Robbbbin. It’s actually pretty useful, since I get a lot of searches like that, and often want to filter them out.

Alternatively, you can build a list of Previous Items by using square brackets. Like this: [abc]+ This will return a, ab, cab, c, b, bbbb and the like. This seems a little strange, but in fact, if you read the interpretation (“match one or more of the previous items”), you’ll notice there isn’t anything about the previous items being in a specific order.

However — I couldn’t think of any way to use square brackets with a plus sign that I couldn’t achieve with other Regular Expressions. So I wrote my tutor in Australia, Steve. The best example he had was searching for a space. Thus: if I wanted to know how many people type in web site or web site or even web site, I could create web[ ]+site for my Regular Expression.

If you have any other great uses of square brackets and plus signs for Google Analytics, please share them.

Dots .
Carats ^
Dollars signs $
Question marks ?
Pipes |
Parentheses ()
Square brackets []and dashes –
Plus signs +
Stars *
Regular Expressions for Google Analytics: Now let’s Practice
Bad Greed
RegEx and Good Greed
Minimal Matching


Our founder, Robbin Steif, started LunaMetrics in 2004. She is a graduate of Harvard College and the Harvard Business School, and has served on the Board of Directors for the Digital Analytics Association. Robbin is a winner of a BusinessWomen First award, as well as a Diamond Award for business leadership. In 2017, Robbin sold her company to HS2 Solutions and has since retired from LunaMetrics.

  • skr325

    Great posts. Now I just need to test everything. Do you know a way to test RegEx in the updated GA interface? I’ve tried but the filter is a bit easier (which also means almost anything gives results).

    Hey, one more quick thing — to be found by the many others looking for your posts you may want to add “Google Analytics” to the beginning of the article & page titles.

    Thanks again for taking the time to dumb this stuff down for us folks who’ve never written a line of code!

  • Hi Steve. I confess, I am not sure what you mean by testing RegEx in the updated GA interface. Did you mean that the filter that they provide has “bigger holes” and anything gives results, i.e. easier than the old one? I actually didn’t find that, but I could be wrong. Tell me more what you mean by that… you know, the RegExen are very greedy, so they are supposed to return the most results possible unless you constrain your search severely.

    I test all important RegEx expressions with the Epikone RegEx tester:

  • skr325

    I like to test my expressions in Google Analytics (outside of goals), however the updated analytics seems to have changed the expression logic and the filters don’t work quite the same way. Once I lose access to the old reports, I fear that I will lose the ability to test against my own data set. Epikone is great but it only gets me so far…maybe if I get better at RegEx it will be more helpful..hmm.

    Hey, I found this tonight and thought it may be of use:

  • Show me. I am dying to see. I promise I will get the info to Google (they probably read this anyway.) Use Dylan Lewis’ new web analytics wiki, the Google Analytics are open to everyone, here is the userid and password.

  • Excellent site. A lot of useful info here. I’m sending it to several pals ans also sharing in delicious. And certainly, thank you to your effort!

Contact Us.

Follow Us



We'll get back to you
in ONE business day.
Our Locations
THE FOUNDRY [map] LunaMetrics

24 S. 18th Street
Suite 100

Pittsburgh, PA 15203


4115 N. Ravenswood
Suite 101
Chicago, IL 60613


2100 Manchester Rd.
Building C, Suite 1750
Wheaton, IL 60187