Regular Expressions eBook – A relic or valuable tool?


Regular Expressions eBookLast year, when I started working on an eBook for Google Analytics and Regular Expressions, one of my acquaintances wrote, “That’s so 2008.” (And just think, now it is 2010.)

So I put it all on the shelf for a while, until Nick M and Avinash did this video and addressed RegEx (Regular Expressions) again. Hmm, I thought.  Well, I use them all the time. And people write me with their RegEx and say, “Please help me troubleshoot them” all the time.   And then I saw a plea for help on a bulletin board. And finally, when Nick and Avinash did that Nick-and-Avinash show referenced above, I thought, time to finish this ebook.

So here is my guide to Regular Expressions (including the cartoon characters) . You can download it, or read it in html.

I know that there is one design error, but I don’t want to fix it yet again until a lot of you RegEx fans get a chance to read and comment.

All thoughts are welcome.  And remember what David Meerman Scott says: On the Internet, you are what you publish.


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.

  • Regular expression in headache for me when it comes to exclude multiple ip ranges in GA. Hope this will helps me in mastering Regex. Thanks for sharing.

  • Am I wrong, or did someone flip the backslash character on page 7 (upper right graphic) into a forward slash?

    GREAT resource, btw! Thank you sooooooo much for sharing it!

    • Robbin Steif

      Hi Mike. You are not wrong. It is the one error that I know about, but it is a design error, so I don’t want to send the book back to the designers until I know about any other changes that have to be made…. (Any that you see???)


  • Robbin – I went through the entire ebook, word for word (and even learned some things). Great introductory material! Aside from the backslash graphic (page 4 and 7), I suggest you change the reference URL on page 7 for the Google Analytics search and replace filter. It points to a page that describes the filter, but not how to create one. Very frustrating if you are trying to see what is being described in the book.
    A better link would be
    Also, I noticed (for the first time) that the GA UI for that filter page doesn’t mention RegEx anywhere…kind of like you’re supposed to know (I wonder how many people’s filter expressions don’t work because they didn’t realize the special characters were interpreted by RegEx differently?)

    Anyways – Love it!

  • Robbin Steif

    Hi Mike, thanks for the very strong read, it is what I am looking for. Maybe I will just link to a post that I wrote long ago on search and replace (because you are so right about how you have to know it without them telling you.) Any other comments are welcome, I want to have one last round of corrections only. I think I will hold out for another week.

  • As mike’s co-worker, I can’t help but mention that the product he works on supports filtering GA text data using Regex filters while bringing the data into Excel. This can be very useful for improving the readability of urls, removing unwanted domains, that kind of thing.

  • This is great, I will send to my friends that ask me for help with regex so they can understand instead of me just giving them fish all of the time.

  • Lucas

    I would like to tahnk you for sharing this knowledge with us. I´ve recently started to work with Web Marketing, and in one hand I´m very good at markting but I´m still lost in the web part. Your text about Regex helped me a lot.

    Many thanks to you!

    PS: By the way, sorry for my poor english (I´m Brazilian).

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