TOOL: The Regexinator, A Google Analytics RegEx Include Filter Compiler

June 24, 2013
By Dan Wilkerson

The Regexinator is a simple tool that concatenates large amounts of data with pipes and escape character expressions. You can paste your data in the text area in rows or as comma separated values. Once you’ve clicked ‘Regexinate!’, it will return those values as a regular expression, with the aforementioned formatting. You can also specify if you want each term to be exactly matched by checking the ‘Exact Match’ box below the text area.


Back in December, I released the first version of the Regexinator as an Excel spreadsheet. I made the tool because I found myself frequently needing to quickly roll up and compare pages that lacked common taxonomy inside Google Analytics. Let’s take a look at an example; now, for sake of brevity, let’s limit our actual example to three products, but in our imaginations, let’s pretend that you had, say, 120 similarly unstructured product pages and you wanted to look at and compare them all in the same report. We’ll use these three product pages for our example:

  • Red Hat 1 (example.com/redhat1)
  • Red Shirt 1 (example.com/holiday/shirts/redshirt1)
  • Maroon Pants 21(example.com/pants/maroonpants21)

After getting the URIs into a table or comma separated list, you would copy and paste them into the Regexinator and click Regexinate!. The Regexinator gobs all of those URIs (or terms) together, escapes each input to avoid any accidental RegEx, and then makes the string exact match (if you so please) The resulting filter would look like this:

^Q/redhat1E|Q/holiday/shirts/redshirt1E|Q/pants/maroonpants21E$

Then, you can paste that super long expression into an advanced segment or filter and see all those pages rolled up and make comparisons on a page-by-page basis (note: I’m told there are character limits for filters and advanced segments that occur around 1600 characters, but I was unable to determine a specific breaking point when I tested). If you’re a regexp impresario, this is probably not the solution you would prefer. Seriously, this thing is not at all graceful; if it were a product, it’d be the kind that Billy Mayes would breathlessly scream at you about at two in the morning.

Although this method is more brute force than finesse, I found it helpful, and so did some of you. Justin Cutroni (Let’s see if his Google Alerts are working) pointed out it would make a nice web app; so, here we are. It’s certainly not the prettiest Javascript at the fair, but it gets the job done.