I was discussing it with one of my developers recently
and apparently, in development circles, regex users are considered gods of the programming world! I have only used regular expressions in the context of Google Analytics, so I find this amusing, as there are just a few simple rules to learn to open up a world of filtering and reporting possibilities!
Everyone using Google Analytics owes it to themselves to learn these few simple rules! It will save you time and headaches when getting your insights, enable you to set up advanced segments quickly and easily, spark off much more funky filtering in your profile settings, and also just in the filter panel when you’re running your reports.
These regular expressions each deserve their own post. You will soon find a list below covering everything you will ever need to know about regex for Google Analytics!
I’ll also post some practical examples of where I use regular expressions in Google Analytics and what for. You will soon see what you’ve been missing out on!
I recommend you learn one or two and try them out before coming back to learn a few more. This is how i learned and it’s useful for a number of reasons. If you just try one or two, and get unexpected results, it’s much easier to find where you went wrong! The other reason? If you learn gradually you’re much more likely to retain the info.
Links to the rest of the series:
RegEx 1: Introduction – You are here!
RegEx 2: Pipe
RegEx 3: Brackets
RegEx 4: Question Mark
RegEx 5: Backslash
RegEx 6: Plus Sign
RegEx 7: Dot
RegEx 8: Star
RegEx 9: Dot Star
RegEx 10: Caret
RegEx 11: Dollar Sign
RegEx 12: Square Brackets
RegEx 13: 5 Great Places to use RegEx